Base64 image data to files in losant

I want to get image files in jpeg or Png from base64 string data and use those images in the http payload. I could send base64 string normally in the payload for http, but the issue is the length is not getting accepted when its over 50kb or even less.
So, alternatively if I can create an image in files and give the URL that losant exposes for image, that would be helpful, and is there anything that i can do that base64 string length error cannot throw if I try with actual approach.

Hi @Harish_cherupally - welcome to the Losant forums!

Can you please provide a screenshot of the error and the Workflow ID in which you are experiencing the issue? You can click the button to the right of the workflow name / dropdown arrow as shown below to copy your Workflow ID:

Screen Shot 2022-10-19 at 10.17.53

Once again, welcome to the forums!

Hi @Sebastian_Turner , The Workflow id is: 6327ff50507683be18b6980b

Uploaded the image too for your reference.

Based on your screenshot, it looks like you have the raw base64 string in the Body Template field, which is resulting in the error. If you instead store the base64 string as a template and reference the value in the Body Template field, you shouldn’t run into the length limitations. For example, if you had the string stored at the path of base64img:

	"description": "base64 test",
	"file_name": "image.jpg",

The three {{{ }}} instead of two {{ }} is necessary to avoid escaping any special HTML characters.

Let me know if this solves your problem!