简体   繁体   中英

Azure Blob Storage SDK v12 - BlobClient DownloadAsync gone?

I have production code that uses the BlobClient.DownloadAsync()<\/code> method to download a file from Azure Blob Storage using the Azure.Storage.Blobs<\/code> nuget package v12.8, and it seems to be working just fine. However, I upgraded the nuget package and was about to write some new code to deal with zip files, that also relies on downloading in order to extract the zip...but noticed some changes in the latest APIs of the Storage SDK.

But I can't find any articles\/issues\/docs that point to that for sure. Here's what that looks like:

For anyone else coming to this trying to figure out how to stream\/download files from Azure blog storage into an object the OP Github issue<\/a> is the best documentation I have come across.

DownloadContentAsync() - preferred way to fetch blobs that fit in memory
DownloadStreamingAsync() - stream when bandwidth adequate (otherwise OpenReadAsync)
OpenReadAsync() - fetches buffered chunks when bandwidth inadequate or consumer slow (otherwise DownloadStreamAsync)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM