Posting Signature via RestAPI as Image

Hello Everyone,

I am attempting to POST a signature from the signature pad similarly to how I post uploaded files using the RestAPI. Simply put, when a user signs, I would like to take that signature, and POST it using RestAPI as an image to be uploaded to an external files server. I have tried several things to input into the file section on the body of RestAPI but none have worked. Here is what I have attempted to utilize, which works fine for my file uploads, just not the signature pad.

{{ {...signature1.files[0], "data": signature1.value[0] } }}

It is also worth noting that I am able to send signatures via SMTP using HTML: <img src="data:image/png;base64, {{signature1.value}}" alt="Signature" />

Any advice is greatly appreciated!

Hey!
Did you base64 decode the image? Looks like that might be the culprit :-).

Jonathan

You are entirely correct! I am just realziing that on the server side, I need to decode it, convert it to an image, and move it to the appropriate directory.