Last Updated: February 25, 2016
· silasribas

Make file upload with curl in terminal

Open your terminal/console and type this:

curl -F "depositFile=@./test.txt" http://localhost:9090/process.php


  • 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