Is Azure a single "block block" seen as one file?
Question:
This may be a simple question, but I cannot find an answer to it. I just started using Azure storage (for storing images) and want to know if one "blob" contains at most one file?
This is my container named fmfcpics
:
Inside the container, I have a named block myBlob
, and inside it I have one image:
In the following code, if I load another image file in myBlob
block blob
, it will overwrite the already existing image:
CloudBlockBlob blockBlob = container.GetBlockBlobReference("myblob");
using (var fileStream = System.IO.File.OpenRead(@"C:\Users\Me\Pictures\Image1.jpg"))
{
blockBlob.UploadFromStream(fileStream);
}
Is this rewriting correct? Or should I be able to store multiple files in myBlob
?
source to share
Each blob is a completely separate object, directly addressed through the uri:
http(s)://storageaccountname.blob.core.windows.net/containername/blobname
If you want to manage multiple objects (like a jpg in your case), you load each one in a separate blob name (and you can store as many as you want in one container, and you can have as many containers as you want).
Note. These are blocky blobs. There are also page frames that are randomly accessed and this is the basis for storing the VHD (in which case the vhd will have a formatted filesystem with multiple files in it).
source to share
In the blob Azure Documentation, you understand how blob works and the concepts behind blob storage.
In a few minutes you can easily use the service
source to share