We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3d0bc8 commit 6282ffcCopy full SHA for 6282ffc
Background Scripts/Convert Attachment To Base 64/ConvertAttachmentToBase64.js
@@ -0,0 +1,16 @@
1
+/* attGr is a GlideRecord from sys_attachment table */
2
+
3
+function attachmentToBase64(attGr) {
4
5
+ /* constructor of GlideSysAttachment class */
6
+ var gst = new GlideSysAttachment();
7
8
+ /* fetching the attachment content in bytes */
9
+ var bytes = gst.getBytes(attGr);
10
11
+ /* encoding the bytes in base64 format */
12
+ var base64Content = GlideStringUtil.base64Encode(bytes);
13
14
+ return base64Content;
15
16
+}
0 commit comments