解决方法
两个选项真的…第一个是直接将用户重定向到blob(如果blob在公共容器中)。看起来有点像:
return Redirect(container.GetBlobReference(name).Uri.AbsoluteUri);
如果blob位于私有容器中,则可以像上一个示例一样使用共享访问签名和重定向,也可以读取控制器操作中的blob并将其下载到客户端:
response.addheader("Content-disposition","attachment; filename=" + name); // force download container.GetBlobReference(name).DownloadToStream(Response.OutputStream); return new EmptyResult();
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。