How to get binary data of attachment?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2018 07:27 PM
Hi all,
There is a sample coding which is from service now document.
var attachment_sys_id = 'bacd7034dbeaa3403aff6a4948964f28';
attachmentStream = new GlideSysAttachmentInputStream(attachment_sys_id);
However, attachmentStream is just something like "[B@89e840" but I want the real binary data.
I have read through documents but I didn' t find the answer.
Can anyone help me out?
Labels:
- Labels:
-
Scripting and Coding
15 REPLIES 15

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2020 02:44 AM
For all those still unable to download attachment, I've uploaded a Scripted REST API source in the following thread. Please also read the reply to the code because I've fixed a bug.