Comment on $ cat ~/myfile | curl -X PUT --upload-file “-” https://transfer.sh/myfile.txtComments−charonn010yFYI The "-X PUT" argument is not doing what you think it is[1], and is superfluous since you're using "--upload-file".You almost never really want "-X".[1]: https://curl.haxx.se/docs/manpage.html#-X−lsaferite10yJust to clarify your point, --upload-file with a trailing slash results in a POST and without a trailing slash it results in a PUT.−charonn010yRight. -X overrides this default behavior without otherwise affecting the semantics of the request.
Comments
FYI The "-X PUT" argument is not doing what you think it is[1], and is superfluous since you're using "--upload-file".
You almost never really want "-X".
[1]: https://curl.haxx.se/docs/manpage.html#-X
Just to clarify your point, --upload-file with a trailing slash results in a POST and without a trailing slash it results in a PUT.
Right. -X overrides this default behavior without otherwise affecting the semantics of the request.