File attachment in bytearray
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 01:52 AM - edited 09-15-2023 08:42 AM
Hi,
Is there a way to convert a file attachment in a bytearray stream? not base64, an Array of bytes.
It's needed for an integration: the web service is asking for a file in byte array format.
I tried two things:
1) Packages.java.io.ByteArrayOutputStream();
2) GlideSysAttachment.getContentStream(), and then using GlideTextReader as suggested, but i don't understand what GlideTextReader methods do, it's not well explained.
The first option give me a small string like "[B@143e765" instead of a byte stream. The second one i can't even make it work.
Thanks,
Luca
0 REPLIES 0