Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
320 views
in Technique[技术] by (71.8m points)

Zip multiple Azure Blob Storage Files and get its zip linked

I want to create functionality in my ASP .Net MVC application in which user will be able to download multiple AZ Blob files in zip folder. For doing this I've search for different scenario's.

  1. Download multiple files through network stream and creating zip through that network stream.
  2. Create zip file for multiple files in Azure and get that shareable links to download zip.

My problem is that AZ Blob Public Access Level is set Off. So, that's why I cant download all files through network stream because there is a chance that files might be corrupted due to access level.

I want my AZ function to zip my files on AZ Blob then I will share that zip link to the user to download the files as zip.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

My problem is that AZ Blob Public Access Level is set Off. So, that's why I cant download all files through network stream because there is a chance that files might be corrupted due to access level.

If you set the Public Access Level to disable, then anonymous access to the blob will definitely be blocked. And if you pass the verification, you can access the blob without any problems.

I want my AZ function to zip my files on AZ Blob then I will share that zip link to the user to download the files as zip.

Of course you can do this through azure function, but your storage settings make it impossible for any anonymous users to access the blob. Just giving the link is not enough, you need to make them pass the verification.

I suggest you do not access blobs based on link. Please use the code to generate the sas token, and obtain the zip file through the authentication of the sas token.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...