We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

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