ファイルをダウンロードするには、page.aspx のソリューションが必要です。fileMessageName
データベースには、 ( System.String
)、fileMessageBytes
( )の 2 つのフィールドを持つ「メッセージ」テーブルがありますSystem.Byte[]
。バイトからページ上の実際のファイルを取得する必要があります。
1040 次
2 に答える
1
ASPX でこれを行う方法についてはわかりませんが、ダウンロード用の新しいページを追加する必要があります
- ファイルバイトを取得する
- ヘッダー エントリを追加
Content-Type: application/octet-stream
- ドキュメントにデータを書き込む
于 2012-05-29T11:02:57.247 に答える
1
Martin Risell-Liljaに加えて
ダウンロードコントローラー
Function File(id As String) As FileContentResult
Dim Icat = New WebClient().DownloadData("https://file.blob.core.windows.net/app/" + id)
Return New FileContentResult(Icat, "application/octet-stream") With {.FileDownloadName = "Höbölö"}
End Function
MemoryStream の場合
Function File(id As String) As FileStreamResult
Dim Icat = New WebClient().DownloadData("https://file.blob.core.windows.net/app/" + id)
Dim ms As New MemoryStream(Icat)
Return File(ms, "application/octet-stream","Höbölö")
End Function
取得: www.mysite.com/Download/File/bidi.exe
ユーザー メタ タグを承認したい場合、またはカスタム オプションのダウンロードが遅くなる可能性がある場合。
于 2012-05-29T11:51:13.437 に答える