5

I have tried:

curl -v --http1.0 --data "mac=00:00:00" -F "userfile=@/tmp/02-02-02-02-02-22" http://url_address/getfile.php

but it fails with the following message: Warning: You can only select one HTTP request!

How can I send a mix of data and file by curl? Is it possible or not?

Thank you

1 Answer 1

4

Read up on how -F actually works! You can add any number of data parts and file parts in a multipart formpost that -F makes. -d however makes a "standard" clean post and you cannot mix -d with -F.

You need to first figure out which kind of post you want, then you pick either -d or -F depending on your answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.