Reputation: 3622
I would like to allow a website to view an image stored in Azure Blob Storage.
Easy, right? Just allow anonymous access and give the link to the file, then the website can show it directly from the blob.
However, I would like to hide the location of the file, so I want them to find the file in another endpoint.
I can do this by making a .NET application, that will receive the file request, then stream the file from the blob and back to the client. Mission accomplished.
But this would mean every time a file is served, it costs memory and cpu power.
Now to my question:
What would be the most efficient way of accomplishing my goal?
Is there perhaps some way to hide the location of the blob WITHOUT requiring me to have the calls go through an application?
Upvotes: 0
Views: 66
Reputation: 2624
Depending on your needs, a URL rewrite could help. Please review this post from Stack Overflow:
Otherwise, I wouldn't worry about CPU/memory if you want to take the approach you mentioned. Azure doesn't charge you for variations in memory/CPU and such an operation would unlikely result in an extended spike unless you weren't configured to scale out and up correctly. People stream from and to blobs all the time from their backend code. Let us know why you feel this is of significant concern.
Upvotes: 1