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 502f3c7 commit 4c84796Copy full SHA for 4c84796
Script Includes/Convert image into base64/Convert image into base63 encoded string.js
@@ -0,0 +1,18 @@
1
+var BigEncoder64 = Class.create();
2
+
3
+BigEncoder64.prototype = {
4
+ initialize: function() {
5
+ },
6
+ // This script will help to convert the image into base64 encoded string.
7
+ GetBase64EncodedString: function(attachment_sys_id) {
8
+ var StringUtil = new GlideStringUtil();
9
+ var gsis = GlideSysAttachmentInputStream(attachment_sys_id); // pass the attahment sys_id
10
+ var baos = new Packages.java.io.ByteArrayOutputStream();
11
+ gsis.writeTo(baos);
12
+ baos.close();
13
+ var base64Data = StringUtil.base64Encode(baos.toByteArray());
14
+ return base64Data; // return the base64 encoded string.
15
16
17
+ type: 'BigEncoder64'
18
+};
0 commit comments