fileshare icon indicating copy to clipboard operation
fileshare copied to clipboard

Uploading to custom server

Open epatpol opened this issue 9 years ago • 6 comments

Hi,

I think it would be nice to be able to upload to a custom server (i.e hosted on a VPS). This would probably mean that fileshare would have a fileshare-server version, but I think it could be great.

Haven't done python in a while, but maybe just a small Flask server with some API endpoints would be enough. This way we could customize it even more in the future to allow uploading of files/text/anything from the clipboard, just like puu.sh on Windows.

Anyway this is just a suggestion, I was thinking about developing my own puu.sh for linux for a while, but fileshare seems to do most of what I wanted as features already.

epatpol avatar Mar 29 '16 20:03 epatpol

Hi,

thanks for the feedback!

Fileshare is a pure client application and can be modified to upload to any service that provides necessary API. If you want to upload images not to Imgur.com but to some other service or if you have your own file storage server that provides API and is registered in the web or you can add corresponding class to https://github.com/aikikode/fileshare/blob/master/upload_services.py file (look how it's done for Imgur and Droplr). Or send me the link to the service you'd like to use and I'll see whether it can be added to this tool.

P.S. Right now I don't plan to develop my own file storage server.

aikikode avatar Mar 30 '16 12:03 aikikode

Hi @aikikode

For now I was thinking about puu.sh as another service that fileshare could be using. I have a modified script that pushes selected screen area to puu.sh. The API is very simple and it's not as secure as IMGUR, it's just an API key (specific to your account) that you need.

I think I could do it, I'm not very good in python but if I have some spare time I could look at fileshare's code.

As for custom servers, I'll think about it later, but I was thinking about a small node/flask instance with very simple API endpoints for pushing images, so that anybody could use their servers to get url like so : www.yourcustomdomainname.com/imageID.jpg .

epatpol avatar Mar 31 '16 16:03 epatpol

I'll see what can be done for adding puu.sh.

aikikode avatar Apr 05 '16 09:04 aikikode

Hey, could you maybe also add pixeldrain? I have a really simple API, just POST the file and get an URL back: http://pixeldra.in/api#upload. Registration is not required btw, but if you include a session cookie the file will get added to your account.

When I drag a file into the dropping window now it says that it can't upload a file of that type, but pixeldrain supports everything and also provides online previews.

I'll see if I could maybe add it myself, but I'm not familiar with python at all.

Fornax96 avatar Apr 05 '16 10:04 Fornax96

How about supporting cloudapp? Their api is pretty solid (https://github.com/cloudapp/api) and there's even a third party command line uploader: https://github.com/jchook/cloudapp-linux

adrianocr avatar Jul 10 '19 19:07 adrianocr

@Fornax96 @adrianocr thanks for the suggestions, I'll try to look into them.

aikikode avatar Jul 10 '19 20:07 aikikode