File upload not working for multipart/form-data
Bug description
When we publish an api using openApi specification and add an endpoint with request body "content-type = multipart/form-data", we are not able to see the Upload file option in developer portal

Reproduction steps
- Add an api using openApi specification
- Add an endpoint with the request body "content-type = multipart/form-data"
- Open the developer portal, go to the endpoint and click on the Try it button
- Upload file option is not displayed
Expected behavior
Upload file option should be displayed
Is your portal managed or self-hosted?
Managed
Environment
- Operating system: MacOs Big Sur
- Browser: Google Chrome
Additional context
Following observations:
- Json for openApi specification for swagger and APIM are different
- Differences that we observed
- schema type is not added in requestBody -> content -> multipart/form-data in APIM openApi specification
- format for schema -> properties -> fileName is not added in requestBody -> content -> multipart/form-data in APIM openApi specification
- encoding -> fileName -> style is not added in requestBody -> content -> multipart/form-data in APIM openApi specification
Swagger openApi Specification:

APIM openApi Specification:

@Yogesh-BK, thank you for opening this issue. We will triage it within the next few business days.
@Yogesh-BK We support multipart/form-data in OpenAPI v2: https://swagger.io/docs/specification/2-0/file-upload There is currently a bug with OpenAPI v3 support, where "format: binary" isn't accepted by API Management. As a workaround, you can use "type: file" to have the upload file selector visible in the developer portal.
(edited by @mikebudzynski for clarity)
@Yogesh-BK, thank you for reporting the bug.
@ygrik Thanks for your response, It would be great if you could share the expected timeline of this getting fixed and released. When we try to use the type: file, we are getting the warning as below but this warning doesn't stop us to hit the api and it seems irrelevant.

@Yogesh-BK good catch. I fixed the warning to stop making requests https://github.com/Azure/api-management-developer-portal/pull/1492
@ygrik Is there any particular reason for limiting the size of files to 3 mb? Can this size limit be increased to some extent? Also, Could you share the expected timeline for the above bug fix?
@Yogesh-BK The 3Mb limit is inherited from the deprecated developer portal. We can introduce a setting to allow you to overwrite that limit.
The multipart/form-data fix for OpenAPI v3 will be released with a regular API Management service release. At this moment we don't have an ETA to share, but it should be available in the first quarter of 2022.
(edited by @mikebudzynski for clarity and to provide release ETA)
What would be expected timeline for getting this issue fixed?
Pinging @mikebudzynski ;) Is there an eta for getting this issue fixed?
Is there an update on this? We're more than a year past the ETA of first quarter 2022, so it'd be nice to get more information.
Any news please?
@ygrik @JMach1 we are stuck here because we are using the generated openapi spec from APIM to be consumed and this 2 feature are blocking: 1 - Developer portal Multipart upload should be compatible with OpenApi Spec 3 (no changes in the spec need to be done) 2 - The developer poral should show upload file widget.
This issue is related to managed developer portal. We advise you to create a Azure support request to get assistance on this issue. Please refer to the below link to create a new Azure support request, Please select Problem Type = "Developer Portal" in the request to route it appropriately.
https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request