How to receive data from Multipart/form-data and send it to s3 bucket?

Hello folks,

My use case is to create an API proxy that can receive a file(XSLT file) from Multipart/form-data and send it to the s3 bucket in AWS. Also, there is some metadata also which comes in form-data which is also required to be sent to some other source.

Any help for this mock proxy would be appreciatable.

0 1 337
1 REPLY 1

An Apigee proxy is normally a pass-through.  If you want to pass a multi-part form through to an upstream endpoint, you don't have to configure antyhing special in Apigee - passthrough is the default behavior. 

I think what you are imagining is an Apigee API proxy accepting a multi-part form as input, and then POSTing an XML file to an S3 bucket. 

You can do that but you need to extract the XMl file (XSLT file) from the multi-part form. 

Search the archives here and you will find some suggestions for handling multi-part forms and extracting the content of the payload from such forms. After you do that, then all you need to do is post the extracted data to S3. 

It should be pretty simple. Do some searching (here) and you 'll find the answers.