SrS2225a / custom_uploader

Custom Uploader is a simple, lightweight, and easy to use file uploader built using flutter for android devices that allows you to upload files to a file host of your choice.
MIT License
41 stars 2 forks source link

Allow different request types #1

Closed jhotmann closed 9 months ago

jhotmann commented 1 year ago

Some APIs take put requests instead of posts. Some even use get requests with data encoded in url parameters but this is pretty uncommon.

Overall, cool utility and I can see many uses for it!

SrS2225a commented 1 year ago

Glad you like it! I actually never really saw an api take an upload request other than post before, so I thought it would be fine if it just did post requests, but that is good to know and makes since. Partly another reason is that adding an api is already a bit complex, and I did not want to make it too jarring for the end user. Ill be happy to add your feature request once I find a solution thats a bit more user friendly, but right now I am more focused on getting the app on f-droid. Thanks for your suggestion!

SrS2225a commented 1 year ago

Hey there,

I just wanted to give you an update on how getting the app on fdroid is going. It is ready to be added onto their repositories as they are now happy with it, but now I am just waiting for someone to accept it, please see: https://gitlab.com/fdroid/rfp/-/issues/2304 and https://gitlab.com/fdroid/fdroiddata/-/merge_requests/12469. As per your original suggestion, I have deiced it will only support POST and PUT requests. I also plan on having the app figure out which request will need to be used automatically so that the add api screen wont become too complicated

P.S. Once I start working on it, I will add the "working on" tag to this issue

Efreak commented 1 year ago

If you want to add a full feature for sharing uploaders, you might want to consider supporting an existing format like ShareX's sxcu (admittedly, this looks far more complex than I thought it was, so probably not the best format to choose, but it does show that there's demand for requests other than POST)

SrS2225a commented 1 year ago

Actually, the app already supports sxsu. The app just only supports POST requests for now. You can try for yourself by clicking on the three dots from the add api page. Ill add GET and PUT, but not PATCH and DELETE because as you saw, it's pretty complex, and in my opinion for such an app, ease of use should come first (and one of the problems with sharex). Plus, when has anyone used PATCH or DELETE to upload something?

SrS2225a commented 9 months ago

Hi, a new version will be out in F-Droid soon with your suggestions. It will include PUT, POST, and GET requests. Thanks!