-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to not append uploaded filename to URL #11396
Conversation
This adds an option to not automatically append the filename to the supplied URL when uploading a file with PUT.
Can't you use -T - and pass the file on stdin? The api that insists on a slash seems a bit weird.
|
I am sorry, I forgot to mention that I tried that. That does not work either; because the file size is unknown at that point |
I think that's a bug.
If that is fixed, you should be able to use |
I agree! But it also seems kind of non-optimal that |
Maybe |
Ah, I did not know about that option! I just tried it and that works. So I guess that's an acceptable alternative to this patch. |
I think using what is already present and working is quite a lot better than adding new functionality. Let's stick with that. |
This adds an option to not automatically append the filename to the supplied URL when uploading a file with PUT.
I ran into this issue when using curl to upload a file to REST API endpoint. I ran into the following confluence of barriers:
/
; you could not omit the final/
and when using-T
curl would automatically append the filename, the URL ended up being incorrect and would not work.--data-binary
because that reads the entire file into memory.I temporarily worked around this by using a rewrite rule on my server, but I don't view that as a long-term solution. I believe I got all of the documentation pieces correct.