Decode base64 field and add to record as attachment
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 09:47 AM
I have a field on a case form that is populated with a base64 value. I would like to take that string and convert it back into an image and attach that image to the case. Has anyone had any success in doing this? Thank you in advance for your help!
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 05:21 AM
Hi @gabez
Change
var agr = attachment.write( rec, fileName, contentType, base64Encodedcontent);
to
var agr = attachment.writeBase64( rec, fileName, contentType, base64Encodedcontent);