Help with the GlideSysAttachmentInputStream API

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 06:01 PM
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