mirror of
https://github.com/M336G/sharex-uploader.git
synced 2026-07-28 22:25:57 +00:00
A ShareX image/text/file custom uploader written with Bun in Javascript!
- JavaScript 100%
| utils | ||
| .env.example | ||
| .gitignore | ||
| app.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
sharex-uploader
A ShareX image/text/file custom uploader written with Bun in Javascript!
How to run
- Clone the repository with
git clone https://github.com/M336G/sharex-uploader.git, take a look at .env.example and create a.envfile if you need to configure your server. - Install Bun and run
bun installto install dependencies. - Start the project with
bun run start!
Endpoints
| Endpoint | Description | Authorization? |
|---|---|---|
GET /<filename> |
Get an uploaded file | No |
GET / |
Get a list of every uploaded file | Yes |
POST / |
Upload a new file to the server | Yes |
POST / requires passing the file in the request's form-data with the name "file".
To authenticate, supply a Bearer token to your request's Authorization header (example: Bearer AAAABBBBCCCCDDDD).
SXCU File
Here's a template to make a .sxcu file if you use this project (make sure to replace the YOUR_UPLOADER'S_NAME, YOUR_SERVER_URL and YOUR_TOKEN_HERE fields!):
{
"Version": "17.0.0",
"Name": "YOUR_UPLOADER'S_NAME",
"DestinationType": "ImageUploader, TextUploader, FileUploader",
"RequestMethod": "POST",
"RequestURL": "YOUR_SERVER_URL",
"Headers": {
"Authorization": "Bearer YOUR_TOKEN_HERE"
},
"Body": "MultipartFormData",
"FileFormName": "file",
"URL": "{regex:^(http[s]?://.*)$}",
"ErrorMessage": "{regex:^(?!http[s]?://).*}"
}
Contributing
Pull requests are more than welcome to the project! Feel free to open one if you feel like something needs modification or if there is any problem with the codebase.
Credits
This project is licensed under the Mozilla Public License Version 2.0.