Azure存储文件强制下载到浏览器 [英] Azure storage files force download to browser

查看:51
本文介绍了Azure存储文件强制下载到浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的文件存储在Azure文件系统中,这是要求-

I have my files stored in Azure File System and here are the requirements -

  1. 用户应该能够查看文档,而无需将其下载到本地
    • 这对于pdf正常,但不适用于其他任何mime类型
    • 我尝试设置 Content-Type Content-Disposition (采用天蓝色的文件属性,但没有运气)以及iframe.
  1. User should be able to view the documents without downloading it to the local
    • This is working fine for pdf but not any other mime types
    • I tried setting Content-Type,Content-Disposition (in azure file properties but no luck) and also iframe.
  • 我认为仅使用Azure不可能做到这一点,而必须与One Drive集成吗?如果我错了纠正我吗?

我真的很感激任何投入/想法.

I would really appreciate any inputs/thoughts.

推荐答案

不确定这是否可行,但是在Azure中使用存储帐户时,可以将这些帐户作为网络驱动器映射到任何客户端计算机.这样他们就可以通过文件资源管理器访问这些文件.

Not sure if this is a viable option but using Storage Accounts in Azure, you can map these accounts as a network drives to any client machine. So they would be able to access these files via File Explorer.

This link covers the basic steps in setting it up.

不幸的是,对于希望使用此功能的任何人,他们必须在Windows 8(或更高版本)上才能成功映射网络驱动器,因为它使用

Unfortunately for anyone who wishes to use this feature, they need to be on Windows 8 (or above) to be able to map a network drive successfully as it uses SMB3.

如果该选项为否",我将删除该帖子.

If this option is a no go I will delete the post.

这篇关于Azure存储文件强制下载到浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆