How to use curl Command to submit a HTML Form with File upload

If your HTML form has 2 parameters say description (text-type) & ImageFile(file-type), You can use below Bash command to upload that file with desciption

 

curl -F “description=My Text File” \
-F “ImageFile=@/home/admin/filename.txt” \
http://www.domain.com/upload.php