question

alan-kimelman-md avatar image
alan-kimelman-md asked ·

How do I name an attached pdf document with a name differing from its file path name, using a curl script?

How do I name an attached pdf document with a name differing from its file path name, using a curl script?

A curl example formulated at https://developers.ringcentral.com/api-reference/Fax/createFaxMessage yields the following data string:

--data '{
   
   "attachment":"data:application/pdf;name=A%20different%20name.pdf;base64,<<base64>>","to":["1234567890"] }'.


I created a curl data post, which delivered a fully rendered pdf, but without a new name using the following string:

"-F \"attachment=@$PDF_Container_Field;name=A%20different%20name.pdf;type=application/pdf\" -F \"to=" & $toRecipientTenDigit & "\" "


As an aside, regarding my not using base64 encoding, my script is executed via FilemakerPro via "insert from url" with curl options. I guess that base64 encoding occurs when a curl option -F is streamed via Filemaker's "insert from url" command, as the script delivers a fully rendered pdf.

Question:

What might be correct curl syntax possibilities to simulate the syntax found in the curl command generated at developers.ringcentral.com/api-reference/Fax/createFaxMessage?


fax attachment
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.