mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2026-02-03 06:03:25 +00:00
remove need for file name on upload, simplify API #361
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jtoy on GitHub.
the way to upload is with a command like:
curl --upload-file ./hello.txt https://transfer.sh/foo.txt
why do we need to set foo.txt ?
why can't it be something like:
curl --upload-file ./hello.txt https://transfer.sh/upload
the actual link of the fileis returned anyway so setting foo.txt doesn't help. It seems like a needlessly complex interface. Or am I missing something?
@nl5887 commented on GitHub:
Previous week I updated transfer.sh. You should be able to upload files without a filename now. Btw curl will append the filename of the uploaded file by default.
@jtoy commented on GitHub:
@nl5887 check out file.io's api, no need to upload the file name also:
https://www.file.io/#one
$ curl -F "file=@test.txt" https://file.io
{"success":true,"key":"2ojE41"}
$ curl https://file.io/2ojE41
This is a test
$ curl https://file.io/2ojE41
{"success":false,"error":404,"message":"Not Found"}
@nl5887 commented on GitHub:
When using
--upload-filethe file will be send as body, without any Content-Type or filename hints. That's the reason to send the filename with the request.@nl5887 commented on GitHub:
I'm planning an upgrade with a lot of issues fixed and enhancements, will take this into account as well.
@jtoy commented on GitHub:
I see, would it be useful if we generated a fake file name and extension if no file name was provided? That way we at least give the user the option of not having to double type the name every time.