Start United States USA — software Send PDF Files as Binary Strings

Send PDF Files as Binary Strings

93
0
TEILEN

Learn how to use the power of MuleSoft to send PDF files from Experience API to Process/System API and how to covert it back to PDF file in the second API.
Join the DZone community and get the full member experience. In this article, I am going to explain to you how we can use the power of MuleSoft to send PDF files from Experience API to Process/System API, using the multipart/form-data type, and to covert it back to PDF file in the second API. We are going to read the PDF file from the local disk using Mule’s out-of-the-box (OOTB) File connector to read in Experience API. Then we will be sending this PDF as binary with some other fields to another API (this can be named as Process API) which accepts data as multipart/form-data. Next, we will extract this PDF binary from the received payload and convert it back to PDF and save the file to the local disk using Mule’s OOTB File connector to write. We can either create Experience API using RAML or we can create it directly in Anypoint Studio using an HTTP connector. I am going to create it directly in Anypoint Studio, as its RAML is going to be pretty straight and easy.

Continue reading...