Hello,
I am doing a prototype to build a restful service which allows user to upload an image to S3. The request contains two parts.
1st part is a JSON payload which contains meta-data associated with an image.
2nd part is image/jpeg which contains image payload (octet-stream or base64encoded)
When a request is received at the openresty, I want to parse the body, upload an image to the AWS S3 and then update meta-data into the mongo-db.
How do I parse the multipart body and orchestrate two calls? I do have a working code which supports two separate API to upload to S3 and update mong-db.