
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2023 07:42 AM
Hello everyone.
I'm working on a scripted rest.
My idea is to take all the attachments of a record, transform them into binary and send them through the rest.
I've been trying but none of the methods I've seen have worked for me. For example:
*** Script: null for attachmentid: c7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Is there a way to get all the attachments in binary in an array?
All the best.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 02:28 AM
I found this post:
How to send attachment files in base64 format?
I solved finally with:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2023 03:46 PM
Hi @Jose MMR,
Do you have to have it in binary, or would base64 be acceptable? I can help you convert to base64 via ServiceNow methods, but you'd probably have to use some JavaScript wizardry outside of that to get it to binary.
Let me know if that would be helpful and I'll type something up!
- Aylee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2023 11:29 PM
Hi Aylee,
I think that base 64 is a good way. Could you guide me to obtain any attachment as pdf, jpg...to base64?
Regards.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 02:28 AM
I found this post:
How to send attachment files in base64 format?
I solved finally with: