2024 Sep 30 8:15 AM - edited 2024 Sep 30 8:22 AM
How to retrieve an attached PDF file that is encoded in Base64 from a mime multipart format email
Please share any ideas you may have.
I'm considering implementing this in Groovy
Environment is Integration Suite CloudIntegraion IntegrationFlow
Request clarification before answering.
def attachments = message.getAttachments();
attachments.values().each{ attachment ->
def inputStream = attachment.getInputStream();
def result = new ByteArrayOutputStream();
def buffer = new byte[1024];
def length;
while ((length = inputStream.read(buffer)) != -1) {
result.write(buffer, 0, length);
}
def byteArray = result.toByteArray();
message.setProperty("attachment_body", byteArray);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
22 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.