Download Multiple Files From Azure Storage Account | Web Api Download Files From Azure Storage

Опубликовано: 08 Май 2026
на канале: AzureTeach•Net
4,937
41

Download Multiple Files From Azure Storage Account | Web Api Download Files From Azure Storage | .Net6 Web API download multiple files from storage account | Azure Storage Account download Zip file .Net core

This Download Multiple Files From Azure Storage Account as zip video has the demonstration of creating the zip file with multiple files on the fly in memory and returning as response from Web API.

So, How to create zip file in .net core and How to download files from Azure Storage Account using Web API? It is a simple process. We need to install Azure.Storage.Blobs package to the solution. It exposes all the classes which are needed for downloading multiple files from Azure Storage Account using .net6 Web API. In this video, we have used Azure Storage Account connection strings to access the storage account and download files from azure storage account using .net core.

We can use BlobContainerClient class to access the container which is Azure storage account. We need to pass connection string and container name to BlobContainerClient. Later we can use GetBlobs method to access all the blobs from Azure storage account using .net6 web api. We are going to create in memory zip file, so we need to use MemoryStream and use ZipArchive class to create zip archive. We need to pass MemoryStream to Zip Archive class, so that the created Zip archive will be converted into memory stream. We need to iterage over each blob and create an entry in the zip archive. Need to file the file entry with the bytes from the azure blob. Then we can return File which content type as "application/zip" and mention a file name as optional. This is the most easiest way to download all the files from azure storage container as a zip file using .net core/ .net6 web api.

Chapters
00:00 Introduction to download multiple files from azure storage
00:31 Creating Web API project to download multiple files from azure
03:09 Code to Web API download azure storage files as zip
06:23 Testing Web API Azure Storage Download Multiple Files as Zip

#azurestorage#
#NetCoreWithAzureStroage#
#AzureStorageAccountDownloadFiles#