JoeGandy / ShareX-Custom-Upload

A little PHP script created for uploading custom sharex files to your own webserver
MIT License
165 stars 50 forks source link

Twitter and Google Photos #139

Closed dom6770 closed 3 years ago

dom6770 commented 3 years ago

As for now, it seems ShareX uploads picture embedded into a Tweet or photos from Google Photos as .txt

Example: https://twitter.com/nywolforg/status/1351940301703753728 Result: https://i.neus.xyz/v0OTHz.txt

I took a short look into the php files, and when I change

    if (!isset($extension) || $extension === null || $extension === '') {
        $extension = 'txt';
    }

Now, the URL for the images on Twitter are:

https://pbs.twimg.com/media/EsMOiQbXcAE-g5w?format=jpg&name=small

and logically the scripts uploads it as .txt as there is no extension.

Now, I just thought, maybe a simple URL if check would solve this, but does the script get the URL from ShareX, or just a file from ShareX?

davwheat commented 3 years ago

The server doesn't support uploading an image via URL. It's designed to handle file uploads.

ShareX is just sending the server text, which is interpreted as a text file upload.