Our Mobile App is uploading user attachments and storing it in an SQL table using a function App backend API. We now want to change the flow to MobApp-APIM-Storage Account. We have been able to store and retrieve the attachments through APIM and Storage Account APIs but are struggling with attachment information. Foll is how the input looks
POST Request-Content-Type multipart/form-data; boundary=oUBB7xpVogYp5Ye.iuLqgWTuE-4P0ViXB6_GTvp1g78MCdQtHRrKCy-DHRF0MNM2eGEW_Z
--oUBB7xpVogYp5Ye.iuLqgWTuE-4P0ViXB6_GTvp1g78MCdQtHRrKCy-DHRF0MNM2eGEW_Z content-disposition: form-data; name="document"; filename="other-doc.jpg" content-type: image/jpeg
����...`��
We need to store (if required) separately as metadata and return these fields in response as follows
Get Attachment Response { "attachmentName": "optionaldoc2.jpg", "attachmentType": "jpg", "attachmentData": "/9j/4AAQSkZ.....HoACSDSIAo//Z", "createdAt": "2022-11-19T20:11:44.05", "updatedAt": "2022-11-19T20:11:44.05" }
Specifically, we are not sure how to retrieve the fields name="document"; filename="other-doc.jpg" from input, store it and return in Get call.
Referred to the foll links but did not help.
https://github.com/Azure/api-management-policy-snippets/blob/master/policy-expressions/README.md https://learn.microsoft.com/en-us/azure/api-management/api-management-policy-expressions