I can see that wget has a --post-file option, but the manpage says "Wget does not currently support multipart/form-data for transmitting POST data; only application/x-www-form-urlencoded. Only one of ‘--post-data’ and ‘--post-file’ should be specified."

Is there a similar way for uploading files in multipart/form-data?

link|improve this question

50% accept rate
feedback

2 Answers

up vote 5 down vote accepted

Use curl:

curl -F "file=@localfile;filename=nameinpost" url.com
link|improve this answer
feedback

problem with curl is that it is slow. it is achievable using a perl or python script + PHP I found a guide at http://www.farneville.com check it there

link|improve this answer
1  
Why would curl be slower than a Python or Perl script? – JanC Aug 23 '10 at 20:02
feedback

Your Answer

 
or
required, but never shown

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