Azure Blob Storage
Blob Storage - At A Glance
In the most general case, the term "blob" is commonly used to refer "Binary Large OBject." We can store both small and large quantity of data.Used to store unstructured binary and text data. Large binary objects such as video or audio.Blob storage offers two types of blobs,
1. block blobs
2. page blobs
An Azure Storage Account consist of one or more Containers , each container consists of Blobs. All blobs must be located in a container. In general we can say that an Azure user can have up to five separate storage accounts.
Here we can see the illustration of a blob storage system,
An individual storage account may contain an unlimited number of containers, and also an individual container may hold an unlimited number of blobs. However, the total size of all containers not more than 100TB.
Create A Container
Every blob in Azure storage must reside in a container. The following code will shows how to create a container if it is not existing,
1.Retrieve storage account from connection string
2.Create the blob client
3.Retrieve a reference to a container.
4.Create the container if it doesn't already exist.
Upload A Blob Into A Container
1.Retrieve storage account from connection string.
2.Create the blob client.
3.Retrieve reference to a previously created container.
4.Retrieve reference to a blob named "myblob".
5.Create or overwrite the "myblob" blob with contents from a local file.
Except the last line all are same as that of preivous examples so it is already explain.Delete operation should take place in the last statement.Delete() is used to delete the bolbs.