Even though I've been using Windows Azure for quite some time, a lot of the functionality is unexplored territory to me.
Recently, I took a look at Azure Blob Storage, and I was surprised by how simple it was.
Blob storage is simply a way to store stuff (mainly files). That's about the long and short of it. Here's how to get started:
I don't know of a way to directly upload blobs right from the Azure control panel (yet), but it's very simple to do with some C#. Just add Windows Azure Storage to your project with NuGet (Install-Package WindowsAzure.Storage).
You'll need to create a "connection string" to your storage service. The connection string is just:
Where yourServiceName is whatever your named your service. yourAccountKey can be grabbed right from your Azure Dashboard. Click on the service name and then click "Manage Access Keys" at the bottom of the screen. Copy "Primary Access Key" and paste it in there.
Now you're ready to write some C#. Here's a simple class that I wrote that lets you check for existence of a blob (by name), upload a new blob given a name and a stream (from a file uploaded to a web site, for instance), and a way to delete a blob (again, by name).
It's really that simple. Once you upload some files, go back to your Azure Dashboard and take a peek in the container. You'll see all the blobs there, as well as URIs to get to them.
It's so easy, that I've already moved the images for this site (Cross Cutting Concerns) over to Azure Storage (previously I was storing them off-site with traditional hosting).
Some drawbacks that I've noticed, and how I dealt with them:
I just wanted to thank you for putting this information out there. I'm new to using Windows Azure storage account and most of the articles I've read have been very confusing AND most contradict themselves. It's amazing! So thanks for a clear, simplified example in which i can build on. (my boss will be happy i'm making some headway lol).
Matthew D. Groves lives in Central Ohio. He works remotely, loves to code, and is a Microsoft MVP.