Mid From PDF Azure Microsoft Azure

How do you upload/download files from Blob Storage in .NET?

  • Use Azure.Storage.Blobs NuGet package.

Upload example:

var blobServiceClient = new BlobServiceClient(connectionString);
var containerClient =

blobServiceClient.GetBlobContainerClient("mycontainer");

var blobClient = containerClient.GetBlobClient("file.txt");
using var fileStream = File.OpenRead("localfile.txt");

wait blobClient.UploadAsync(fileStream, overwrite: true);

Download example:

var downloadPath = "downloaded.txt";

wait blobClient.DownloadToAsync(downloadPath);

More from Microsoft Azure Tutorial

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details