Basic image, text & file uploader CDN for ShareX which allows you to upload your screenshots, text documents and any other files to your website and have a random link generated. Because of the length these links are very hard to bruteforce.
- ShareX installed
- A website or webserver (needs to accept PHP and file uploads via POST requests)
- A domain or subdomain
- Clone the code from GitHub.
- Go in the
Upload
folder. - Open
upload.php
with Notepad++. - Edit line 7, 8 and 9 to change your password and link (read the comments next to them).
- Password: this only lets users with the password upload files to your server
- Domain URL: set this to your domain (or subdomain) and don't forget the
/
at the end of the line - Length: this specifies the length of the randomly generated folder- & filenames (e.g. https://cdn.knif.dev/img/3lfUh/S1E7M.png has a length of 5 (the URL starts with the domain, then
/img/
, a random folder name with the length you specified (in this case5
), a random file name with the specified length (in this case5
) and the extension (in this case.png
)))
- Upload the content of the
Upload
folder to the root directory of your website (I prefer to make a subdomain called "cdn" and put the folder to its directory).
- Open all three
.sxcu
files from theShareX-Config
folder with a Notepad++ and change theRequestURL
andpassword
to your own. - Open ShareX, click on
Destinations
andCustom uploader settings
. - Click on
Import
and select the first.sxcu
file, repeat this for the others aswell. - In the bottom left select the corresponding uploader (
Image
,Text
andFile
). - Click on
Test
to check if everything is working correctly.
Done! That's it. If something doesn't quite work out for you just contact me on Discord and I'll try my best to help you.
If you get an upload failed error "request entity too large" then your server doesn't accept large files via PHP upload. Here is the fix: Increase PHP upload limit. If you can't increase it yourself you have to contact your hosting provider.
- Discord:
KNIF#0001
- Email:
admin@knif.dev
- Statuspage for their amazing error 404 & 403 templates
- Pengu for his initial ShareX uploader script I used as a base
- ShareX for their awesome program that enables us to upload our screenshots