Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Help with the GlideSysAttachmentInputStream API

Flavio Tiezzi
Kilo Sage

Hi everyone!

 

Is there any other way to separate the bytes of a PDF file without using the GlideSysAttachmentInputStream API? Since there is no clear documentation on the subject, I understand that ServiceNow does not guarantee support for this API.

 

Basically, I need to split a PDF file into chunks of up to 4MB each.

 

 

var attachmentIS = new GlideSysAttachmentInputStream(attachmentGR.getUniqueValue());

var bytearrayOS = new Packages.java.io.ByteArrayOutputStream();


attachmentIS.writeTo(bytearrayOS, start, content_length);

 

Thanks in advance!

0 REPLIES 0