Reputation: 3990
I want to access the path of the image/blog in the browser, I am using Django rest API and the package Azure storage, I tried to make the container storage public, but still had no luck in accessing the image, what could be wrong?
This is an example of the image I want to access, it's there in the storage but can't access it :
https://gu-stagineis.net/media/blog_images/images_3.jpeg
Upvotes: 0
Views: 542
Reputation: 2069
If you store your images in a container of a storage account and grant public to the container then you can access the images using a URL.
First create a container under the Containers
tab in the storage and then set the access level to container
.
Now click on the newly created container and then click on upload
and upload images in the container .
Here I have uploaded two images If you click on the images a pop will immerge with the url of the that image
This url is publicly accessible and you can make get request to it in you django app
In Browser :
In Postman :
the urls will be of format :
https://<Storage Acount Name>.blob.core.windows.net/<Container>/<Image Name>
@Siddhartha Vikram answer is also correct using the azure storage.blob
Upvotes: 1