Uploading PDF Files using REST API

Hi All,
I am using Rest API from postman.
first saved the form and updating the image attachment. so that i have used the put method to update the form.
I have used base64 encoded for pdf file.


but this is what i get.
Where i have gone wrong.
When i am using test.txt file its uploaded successfully and viewed but pdf is not uploading.
Also my pdf or image file which i am convert to base 64 give huge data which is too large to pass in url.
Any one can help on this.

1 Like

Put it in the Body instead of in Params.

Thank you @rmeyer for your reply. will check and revert you back

Hi @rmeyer,
Its working fine. Can we use the same using ajax function in html file.

In the upper right of the Postman window there’s a “Code” button where you can find examples for many languages and libraries, including ajax.

Yeah got it. thanks you very much for your support @rmeyer.

Possibly this will help:

The case is slightly different from yours: attaching a file directly to a specific invoice.

1 Like

Thank you @MartinHBramwell

Did that help?

yes @MartinHBramwell It helps me.
Thank you.

1 Like

:+1:

For the benefit of others, when you get the kind of answer you were looking for, you should click the
:heavy_check_mark:Solution link at the bottom of that answer. This helps others in the future go directly to the information they seek.