Azure blob storage - blob policy

Radek Source

I am doing web application with profile photo uploader. All photos are stored in one container with UUID as name. Idea is to send back to client side photos according to requested id ( REST API is used in this app).

Question :

What is the best aproach while working with Azure storage to expose those images to client .

My ideas :

  1. Create REST service -> read blob from stream and return it to client side with proper content-type . ( efficiency problem - new stram must be created)
  2. Expose URI to this images (blob URI) . I wonder if it is safe way to do it .


answered 3 years ago Emily Gerner #1

I'm not sure of your criteria, but for giving out access to a particular blob you may want to take a look at shared access signatures. The service would then create a SAS token for the client and return that with the image URI. The client could access the photo using the SAS for authentication.

comments powered by Disqus