Home > database >  Upload multi files with curl
Upload multi files with curl

Time:11-02

I need help with command curl using POST. There may be many similar threads here, but none offer a solution to my problem. I want upload multi files with curl. When I add only one file works without problem, but when i try to upload many files with one command only first file uploaded. I use this command:

curl --user xxxx:xxxx --request POST 'https://example.com/xxxx/xxxx?cmd=upload' --form "[email protected]" --form "desc=myfiles" --form "[email protected]" --form "desc=myfiles"

I tried too this command:

curl --user xxxx:xxxx --request POST 'https://example.com/xxxx/xxxx?cmd=upload' --form "[email protected],dummy3.properties" --form "desc=myfiles"

What is wrong?

Thank you.

I expect to upload multi files, but can upload only 1 files.

CodePudding user response:

I use postman for the request tests and from postman converting requests to the curl commands. To convert requests to curl use this link request from postman and convert to curl

CodePudding user response:

I want to create a linux script and use without Postman. We have clients who need to upload files directly to their website without using postman.

Regrds

  •  Tags:  
  • curl
  • Related