Get Started¶
Command Line Interface to Upload Files to a ShareX Server using a ShareX Custom Uploader .sxcu configuration file.
Upload any file, multiple files, directories, use globs, create archives and much more...
See the Quick Start section to get started...
If you run into any issues or have any questions, support is available.
Features¶
- Use a ShareX Custom Uploader
*.sxcuconfig. - Upload a file or multiple files.
- Specify a custom file name.
- Upload files in a directory with optional glob.
- Upload a directory as an archive.
- Automatically open the URL in browser.
- Automatically copy the URL to the clipboard.
- Display confirmation before uploading multiple files.
- Override all options with flags or env vars.
Quick Start¶
First, install from PyPI or GitHub .
See the Install guide for more options.
Next, download your server's ShareX Custom Uploader *.sxcu configuration.
Using the --config option you can enter a file path or open a text editor.
sharex --config
See the Configure guide for more details.
Finally, upload a file, multiple files, or a directory.
sharex screenshot.jpg
See the Upload guide for more examples.
Additionally, you can import the module into your Python project.
from pathlib import Path
from sharex import api
config = api.get_config(Path("path/to/config.file")) # (1)!
with open("filename", "rb") as f:
url = api.upload_file(config, "filename", f)
print(f"{url=}")
- ShareX Custom Uploader Config JSON.
View the Module Documentation for more details.
Server Support¶
Supports the following ShareX Custom Uploader *.sxcu configurations.
Response Type Support:
json
Upload Type Support:
MultipartFormData
Partial Configuration Example.
{
"URL": "{json:files[0].url}", // (1)!
"Body": "MultipartFormData" // (2)!
}
- Should include
json:in the URL. - Should be
MultipartFormData.
Server Support Request
If your server is not supported, please submit Server Support feature request.
Question
If you need help getting started or run into any issues, support is available!