Linked Questions
43 questions linked to/from Using cURL to upload POST data with files
0 votes
0 answers
878 views
How to POST Image/jpeg data with Curl from Terminal? [duplicate]
curl -v -s -w "Response_Time %{time_total} Response_Code %{http_code}\n" -X POST -H "Content-Type: image/jpeg" -H "Authorization: Bearer '$token'" -H "x-api-key: '$key'"' -F "url=@https://api.ver/demo/...
0 votes
0 answers
732 views
Why is my HTTP POST (binary file) working with Python Requests but not with cURL? [duplicate]
I am trying to send a binary file (.parquet) to a web server via HTTP POST request. The python code below works flawlessly: url = 'http://localhost/update/id' f = open('/home/dev/datafiles/file....
-3 votes
1 answer
518 views
Using Curl to upload file to a PHP and get an "unable to move" error [duplicate]
I'd like set a simple HTTP service (with PHP) to receive files from another computer with Linux curl and Windows Powershell. I have read internet resource, including PHP can't upload files to server? ...
-1 votes
1 answer
352 views
Flask: Create upload server with no forms [duplicate]
I wrote a small flask server. The purpose is to upload files. The important part, is that this is a server which has only a REST API and doesn't render html and template files. This is the code: from ...
-1 votes
1 answer
77 views
Flask: Headless file upload [duplicate]
I want to create a small file upload web server with Flask. The caviat is that i want this to be a headless server. No HTML files or templates server. The user will hit the upload path with a (path+...
-1 votes
2 answers
58 views
collect others parameters in my flask api [duplicate]
I send a json file by curl with this command and its work : curl -X POST -H "Content-Type: application/json" -d @/Users/test/testjson.json 'http://127.0.0.1:5000 I collect this data like ...
0 votes
0 answers
48 views
Recreating a file-based POST request from Django-Rest-Framework test in curl [duplicate]
I have a test case using The test library from Django. In my test I have the following: class TestLoadCurve(TestCase): def setUp(self): self.client = Client() self.test_user = ...
0 votes
0 answers
25 views
Set character encoding for file being uploaded by CURL [duplicate]
I need to upload a CSV file using CURL command. The API where I am posting this file only accepts file in UTF-8 encoding. Here is my CURL command: curl \ --request POST \ --url "url" \ ...
300 votes
7 answers
431k views
What is the right way to POST multipart/form-data using curl?
I used this syntax to post a file along with some parameters: curl -v -include --form "key1=value1" --form upload=localfilename URL The file is around 500K in size. First of all, I see ...
60 votes
6 answers
205k views
Spring/Postman Content type 'application/octet-stream' not supported
I'm using Postman to send the following request: My controller looks like this: @RestController @RequestMapping(path = RestPath.CHALLENGE) public class ChallengeController { private final ...
16 votes
3 answers
60k views
Getting error with move_uploaded_file HTTP wrapper does not support writeable connections
I am currently working on a project with php. Here I want to store the image into folder using move_uploaded_file but when I use the following code : if (move_uploaded_file($_FILES['file_promo_image'...
3 votes
1 answer
15k views
file upload mime type issue with UploadedFile
I am using UploadedFile class in symfony2 to upload image files. I have allowed images with mime type image/jpg and image/png. When I upload a png file from my system to server its mime type is ...
8 votes
1 answer
32k views
Failed to open/read local data from file/application
I was trying to run curl command using PowerShell. below is the curl command curl --location --request POST "controller/lttrouter/v1/TestResult/process-data-results/" --form "synthesisreport=@"C:\...
0 votes
1 answer
13k views
Upload multiple files in body request POST to Spring Restful API
I'm construct an uploading multiple images API by Spring Restful. This is my API method: @RequestMapping(value = GiftURI.TEST_UPLOAD, method = RequestMethod.POST) public @ResponseBody String ...
2 votes
1 answer
7k views
Curl failed to upload file
I refer to this post Using curl to upload POST data with files and this answer to upload files. On Windows, curl -F "file=@/c/Users/lf/Desktop/HQ/README" https://example.com/upload curl: (26) ...