我们的ASP.NET MVC 3应用程序在Azure上运行,并使用Blob作为文件存储.我找到了上传部分.
视图将具有文件名,单击该文件名时将提示文件下载屏幕出现.
谁能告诉我怎么做呢?
asp.net-mvc azure azure-storage azure-storage-blobs asp.net-mvc-3
我想将 blob 下载为字节数组,但发生上述错误。我的代码如下
Dim fullFileBytes() As Byte = {}
Dim objAzureStorage As New AzureCloudStorage
Dim fullImageBlob As Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob = objAzureStorage.CloudContainer.GetBlockBlobReference(row(0))
fullImageBlob.DownloadToByteArray(fullFileBytes, 0)
Run Code Online (Sandbox Code Playgroud)