File overwritten when multiple files with same name uploaded via POST
When multiple files of the same name are uploaded via POST method, transfer.sh overwrites all of them with the last uploaded file. This happens because all the files uploaded in a single POST request get a single UID in the URL, and are named based on the upload name. How to replicate:
- Upload two files with the same name but different contents (for example,
a/foo.txtandb/foo.txtin a single POST request - Open the returned URLs
Expected outcome: The two uploaded files are different
Actual outcome: The uploaded files are the same, with one overwriting the other
Possible solutions:
- Generate a separate UID for each file in a POST request
- Add another unique random string to the filename so that the upload URL is different
thanks @anihm136
since you are already working on the POST handler do you mind implementing solution 1? :)
thanks
Sure, will do. Might take some time depending on my schedule, so do let me know if anyone else wants to take it up in the meantime.