cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Handling Multiple Attachments using HTTP Sender Adapter

1,067

Hello All

I have a scenario where I will get two attachments into CPI as part of the form-data. The payload containing multiple attachments will be sent to the HTTP sender adapter as shown below using postman client:

After enabling trace i see the following payload.

----------------------------034767008203631368718378

Content-Disposition: form-data; name="File1"; filename="Test Document1.pdf"

Content-Type: application/pdf

--

--

--

--

%%EOF

----------------------------034767008203631368718378

Content-Disposition: form-data; name="File2"; filename="Test Document2.pdf"

Content-Type: application/pdf

--

--

--

--

%%EOF

----------------------------034767008203631368718378--

I would like to know how I extract both the attachments.

Thank You!

Accepted Solutions (0)

Answers (1)

Answers (1)

RobertQ
Explorer
0 Likes

Hello Vijhay,

you can simply use the MIME Multipart Decoder in this case.

If you select the option "Multipart Headers Inline", the Decoder step does this:

"The Decoder transforms the first part of the multipart message into the message body of the resulting message and the following parts (if available) are transformed into attachments of the resulting message."

If this answer solves your issue, please accept it.

Best regards

Robert

0 Likes

Hi Robert

The MIME Multipart Decoder did not work. Below is what I was looking for, except for the decryption part mentioned in the blog.

Handling MIME Multi Part response with embedded attachment object in Cloud Integration | SAP Blogs

Thank You.

Vijhay Devarajan.