Uploading an image from angular app is not working

LFPR 101 Reputation points
2021-08-20T18:54:18.203+00:00

I deployed a web API service app and an angular ui service app. I'm trying to upload files from the ui to a blob storage in azure. when running from visual studio it works. The web api runs in one instance pointing to the azure storage account and the angular ui runs in another instance of vs. When uploading an image which is one of the functions of the application, it works. After I deploy to azure, and open the app hosted in azure that points to the web api hosted in azure also, and try to upload an image, it does not work. The image container in azure remains empty.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
{count} votes

Accepted answer
  1. LFPR 101 Reputation points
    2021-08-23T21:01:49.58+00:00

    The fact that it was working with the same behavior with Postman told me that the problem was not in the angular ui. So, after testing couple of scenarios with postman, my conclusion was that the problem was in the communication between the image container and the app service in azure. What I tried first, I added all the outbound IP addresses to the storage account firewall and that made possible the communication and therefore, the upload of the image file.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.