0

I have an ASP.NET WEB API and an angular project. I was willing to use the Azure blob storage to retrieve image files and display them to the users. Is it good practice to retrieve the image URL from the API, send it to the client-side and then use that URL on the client-side to display the image? Url example: https://someurl.blob.core.windows.net/blobcontainer/someimage I am not sure if I should hide the Url from the users.

3
  • I suggest that first of all you setup a Custom Domain on your storage account. Commented Aug 24, 2020 at 8:02
  • @DanielBjörk Thank you for your suggestion. Can you please tell me more about why I should use a custom domain for the storage account? Commented Aug 24, 2020 at 8:21
  • So that your URL hides that you are using a Azure Storage Account. Instead you will get img.yourdomain.com/xxx/myimage.jpg Commented Aug 24, 2020 at 8:23

1 Answer 1

1

if this is a client side app and it will be used a lot another good practice would be to use Azure CDN which is very easy to use with Azure BLOB Storage. Use relative URLs, one way would be to put the exact path in your app settings for example web.config file but the imagename.jpg in your app and lastly secure the access to your storage from your client side via SAS which is one of the most common ways of securing it.

https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview

best practices for security for Azure BLOB Storage https://learn.microsoft.com/en-us/azure/storage/blobs/security-recommendations

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.