Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Post file from Bash shell script

Tags:

bash

curl

I need to post a PowerPoint file to an online service which converts PPT files to PDF. I am new to Bash shell and don't know how to post PPT file from my local computer. How should I modify line below?

curl -i -H "Accept: application/pdf" -X POST http://do.convertapi.com/PowerPoint2Pdf > output
like image 733
Tomas Avatar asked Apr 08 '26 08:04

Tomas


1 Answers

Use the --data-binary <data> option.

$ curl --data-binary @your.pdf ...