Search code examples
multipartform-dataazure-api-management

How to handle multipart/form-data in policy expression of Azure API Management?


I am building an API endpoint in APIM that should accept multipart/form-data and then transform this request to two separate backend API's - one with the form data, and another for file upload. Is this possible to achieve using Policy templates/expressions? The policy expression has limited support for types, and hence use of methods such as ReadAsMultipartAsync() is not possible.


Solution

  • Looks like this isn't supported as of today. There is a feature request that you can up vote for it to gain traction.

    In the meantime, you could have a proxy after APIM and before your APIs, which could separate the form data as required and send them to the separate endpoints as required.