Upload file using Multipart/Form-data via REST Adapter
Requirement:
The requirement was to upload a CSV file to a web service using multipart/form-data. Multipart/Form-data is used when we need to upload a file to any form eg. google form or any other form. In the below screenshot we need to upload text data and the files both.

Solution:
– First, we need to use FormDataBean – although the ‘Support Attachment’ was set on the REST adapter it did not output the final message in an HTTP form, adding an additional form content using this bean resolved that issue.
– Second, we need to convert the payload to CSV Format using MTB
– Codepage & Convert beans are used to encode the payload to handle special characters in the payload.

Data Format:

Headers:

Also Read About,
https://blogs.sap.com/2020/04/20/rest-form-submission-with-dynamic-name-and-filename-attributes/
Post Comment