Tomas
Tomas

Reputation: 18127

Post file from Bash shell script

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

Upvotes: 3

Views: 4082

Answers (1)

user647772
user647772

Reputation:

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

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

Upvotes: 3

Related Questions