We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently in the JS / Fetch example, it shows multipart file uploads like so:
This doesn't work as it just sends the string "logo.png" instead of the file.
A better example might be:
// HTML file input, chosen by user const fileInputs = document.querySelectorAll('input[type="file"]') form.append("file", fileInputs[0].files[0]);
The text was updated successfully, but these errors were encountered:
Python / Requests snippet is also affected, and doesn't even include any code to upload the file:
import requests url = "http://localhost/api/upload" payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nfoo\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n-----011000010111000001101001--\r\n\r\n" headers = { "Content-Type": "multipart/form-data; boundary=---011000010111000001101001", "Authorization": "Bearer foo" } response = requests.request("POST", url, data=payload, headers=headers) print(response.text)
Sorry, something went wrong.
+1 on this issue - I feel file upload is a super common usecase that deserves some love
+1 for python
No branches or pull requests
Currently in the JS / Fetch example, it shows multipart file uploads like so:
This doesn't work as it just sends the string "logo.png" instead of the file.
A better example might be:
The text was updated successfully, but these errors were encountered: