API Management service - How to attach file to the request

Narayana 6 Reputation points
2022-12-25T03:51:34.8+00:00

I have created Azure API Management service (API) to send information (form data with attachment) to vendor API end point. When i test it from Azure, it works fine but when i integrate with my Angular app it is not working. From the log i see that it is not attaching the attachment. Does API support attachments? If yes, please guide me.

273838-image.png

273839-image.png
273894-image.png

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,474 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Vinodh247 35,221 Reputation points MVP Volunteer Moderator
    2022-12-25T11:41:03.53+00:00

    Hi

    Thanks for reaching out to Microsoft Q&A.

    Can any of this help for your issue?

    https://learn.microsoft.com/en-us/azure/api-management/validation-policies
    https://www.c-sharpcorner.com/blogs/azure-ad-integration-with-angular-and-asp-net-core-web-api

    Please Upvote and Accept as answer if the reply was helpful, this will be helpful to other community members.

    0 comments No comments

  2. JananiRamesh-MSFT 29,276 Reputation points
    2023-01-13T13:04:56.4866667+00:00

    Hi @Narayana Thanks for reaching out. From the screenshot I see that in Postman you're attaching a file as binary. As the content-type is multi-part/form data could you please try attaching the file selecting form-data in postman as shown below

    274609-image.png

    Do let me know if you have any queries. I would be happy to assist you.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.