DEV Community

Ali Kolahdoozan
Ali Kolahdoozan

Posted on

2 1

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.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay