Make file upload with curl in terminal
Open your terminal/console and type this:
curl -F "depositFile=@./test.txt" http://localhost:9090/process.php
Specifications:
- F is the option to send POST entry;
- @ define if value of entry is a binary file and not a text value;
- depositFile is a name of POST entry;
- ./test.txt is a path of file you'll be send;
Obs: To send other entry in POST, add more -F "name=value"
in the command:
curl -F "description=This file is contains secrets!" -F "depositFile=@./test.txt" http://localhost:9090/process.php
Written by Silas Bolotta Ribas
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Console
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#