Home » Questions » Computers [ Ask a new question ]

Linux command line tool for uploading files over HTTP as multipart/form-data?

Linux command line tool for uploading files over HTTP as multipart/form-data?

I can see that wget has a --post-file option, but the manpage says

Asked by: Guest | Views: 69
Total answers/comments: 2
Guest [Entry]

"Use curl:

curl -F ""file=@localfile;filename=nameinpost"" url.com"
Guest [Entry]

"This worked for me:

curl -v -F filename=image.jpg -F upload=@image.jpg http://localhost:8080/api/upload"