Decode base64 image and add as attachment to the incident
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2025 12:57 PM
Hi All,
I am trying add a base 64 encoded attachment to the incident with below script. But it is not attaching the image.
var base64String = current.u_image_data;
var base64Bytes = GlideStringUtil.base64DecodeAsBytes(base64String);
var attachment = new GlideSysAttachment();
var attachmentSysId = attachment.writeBase64(current.getTableName(),current.getUniqueValue(), 'test.jpeg','image/jpeg',base64String);
Thanks
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2025 07:18 AM
Hi Ankur,
I am trying in global scope only.
We are attaching the data through excel.
Thanks