php - Post file with curl when field name is something like "image[]" -


How can I post a file using curl as the field name "[]"? I am using @ with the path of the file to upload and it works right, but the image I send does not show up. help please!

You need to avoid brackets, for example:

Curl -XPOST -d @ / tmp / image \ [\] 123.png http: // localhost

or if you want quote because you're doing a lot of this type: < / P>

curl -XPOST -d @ "/ tmp / image [] 123.png" http: // localhost


Comments