Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Sample code for receiving REST message with file attachment via multipart message content-type header?

Not applicable

I need to be able to make an Apigee proxy which can receive a file attachment from another REST API. I found an old Apigee forum post (see below) which says I'll need a call out policy for this. I'm wondering if anyone knows of existing sample Java or Node.js code that can deal with file attachments in this way.

"REST/SOAP messages with file attachments are classified as multipart messages via the content-type header and custom java callout policies have to be written to handle these types of messages. ExtractVariables policy will work only for a xml/json message."

1 8 2,809
8 REPLIES 8