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

:

enter image description here

Inside the container, I have a named block myBlob

, and inside it I have one image:

enter image description here

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

?

+3


source to share


2 answers


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).

+4


source


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

-1


source







All Articles