May
22
I have started using a ShareX for all of my Screen Grabbing needs as it’s supports a lot of different features that I can’t seem to find with any other program.
I first started to use uploadscreenshot.com for uploads, I then I noticed The Website was down more then it was up so I needed a new upload website….. Well I have my own server it’s always up…. I’ll just host it myself…
Well I’m all about security so FTP was out… I liked the SFTP over SSH but.. I would have to allow it over the TwoStepAuth I have for Server logins… So that was out :/
I Know! I’ll use the Custom Uploader feature ShareX has… So here are the Steps to setup this:
- First setup a new sub domain like: uploads.domain.tld
- Then set the 404 Page to be the /index.php page
- Then Insert the following code at: /index.php
After that use change the CHANGEME to a password of your choice and then open ShareX
Then make the following look like this:
Then give it a try 😀
hi, how can i rename files to other forms instead of tmp_name ?
like %unix or others from sharex? thanks, nice script, i like simple coding
Yes you can!
I know this is ‘hilariously’ old, but I actually used your script but changed it so that you can change the length of the link. Updated source:
https://gist.github.com/anonymous/c84ff21675c8fb05349d
I have a feeling rand() might not provide enough entropy to not be repeated… Date() might be better let me know what you think?
Actually, I’d long since just wrote my own script cleanroom.
The way I do it now is generating an http-safe base64 encoded string sourced from openssl_random_pseudo_bytes(8) (10 random characters), then using HMAC-Sha256 with the secret upload key on that to generate a random string which is trimmed for the actual filename. The reason I do that is so that I can have stateless deletion links: If it’s deleting, take the deletion key and hmac-sha256 it with the secret upload key. Then trim that and compare it to the filename passed: If they match, delete the file.
Also implemented a few other tweaks that I figured might be useful to people, including letting people pick a different location for the uploading file (for deletion link paths), and a different directory for the uploaded files.
Make it I’d love to see it