Cannot extract multipart MIME data sent through REST

Hi. I have a problem with extracting multipart MIME that I received through REST. The MIME data has 2 parts: a parameter and a zip file. It seems that it extracts only 1st part of the message. However, if I use pub.is.streamToString and I log it, then I see that the whole message.

The service components that creates MIME data and sends it :
pub.file:getFile (got stream)
pub.mime:createMimeData (empty container)
pub.io:stringToStream (the parameter will be streamed)
pub.mime:addBodyPart (stream-parameter will be added)
pub.mime:addBodyPart (zip file will be added)
pub.mime:getEnvelopeStream
pub.client:http (The envStream will be sent as mimeData.)

Then I receive at the _post and I use the following services:
pub.mime:createMimeData (contentStream as input)
pub.mime:getPartsNum

As the result I get always 1 instead of 2.
Do you know how to deal with that?
Many thanks,
Krzysztof

The solution is as follows:

pub.flow:getTransportInfo
pub.mime:mergeHeaderAndBody

Input to pub.mime:mergeHeaderAndBody:
headerLine (it’s from transport/http/requestHdrs)
body/stream (contentStream from the begging in the pipeline)

This solution was provided by SAG Support and tested by me.

Greetings,
Krzysztof

hi Krzysztof Sochiera,

Can you please help us in the above in detail.
We are working on posting the Multipart file to REST API and we are getting the file at the target as 0 bytes.
Please help us.

Regards
Dinesh

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.