DEV Community

Ali Kolahdoozan
Ali Kolahdoozan

Posted on

AZURE Blob Storage Simple Samples in .NET Core !

This is not an article. Everything is quite clear so I have just shared the source code for you guys.

Add the "Azure.Storage.Blobs" from Nuget packages into your simple Console Application, then follow the lines below.

Image description

This is responsible to simply Lease a Blob object in the AZURE !

Image description

Look at the below code to add a new container to the Storage Account.

Image description

Below code can do the Blob uploading for you.

Image description

Downloading a blob is not that hard. Look at the below code.

Image description

If you are familiar with Metadata in AZURE Blobs, look at the below code. You can set a meta data by following the below code.

Image description

Getting the metadata of an AZURE Blob Object can be done by following the code below.

Image description

If you need the list of all the Blobs under a container , use the code below.

Image description

That's all.

Top comments (0)