Snap type: | Transform | ||||||
---|---|---|---|---|---|---|---|
Description: | This Snap splits a MIME "multipart" binary stream into separate binary documents. A multipart stream is typically generated by HTTP clients, such as Web Browsers, that need to transfer multiple blobs of data as a single message. Input & Output
Modes
| ||||||
Prerequisites: | None | ||||||
Limitations and Known Issues: | None at this time. | ||||||
Configurations: | Account & AccessAccounts are not used with this Snap. Views
| ||||||
Troubleshooting: | The section describes typical issues you may encounter while using this Snap, and instructions on how to workaround them: | ||||||
Settings | |||||||
Label | Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | ||||||
Content-Type | The value of the Content-Type header for the binary document. The value of this header is needed to determine whether or not the binary document is, in fact, a multipart stream and what "boundary" is used to separate the parts of the stream. The default value for this property is an expression that will try to pull the content type from the pipeline parameters (as passed when invoked via a Triggered Task) or the binary input document header. | ||||||
Binary Header Properties | The binary output document header can be modified by specifying properties in this table property. The "expression" column computes the value to insert and the "Target Path" is a JSON-Path where the value should be set in the header. The headers are initially populated with the headers from the parts in the stream. These properties allow you to carryover values from the original multipart input document to the binary output documents. |
Example
In the below use case, we are posting multiple files using the content type as formdata through the REST client:
A triggered task has been created for the specific multipart Reader pipeline, taking the cloud URL from the Manager and sending the REST pipeline request from the Postman client:
The Snap receives request from the REST client and displays an output as a multipart output stream:
(Note we have passed three files from the REST Client, and the same is merged and diplayed as a multipart output stream)