避免 WebDav 请求下载 .doc 文件

发布于 2024-08-15 05:12:44 字数 201 浏览 1 评论 0原文

我们的服务器上激活了 WebDAV。当我们尝试从服务器下载内容类型为“application/msword”的 Word 文件时,会显示 WebDAV 身份验证弹出窗口。我不想要这个弹出窗口。该文件应该直接下载并打开,而无需

我可以避免这种情况的唯一方法是为其提供内容类型“application/octet-stream”。

这是执行此操作的首选方法吗?

We have WebDAV activated on our server. And when we try to make a download of a word file from the server with the content-type "application/msword" a WebDAV authentication popup is shown. I do not want this popup. The file should just be downloaded and opened without

The only way I can avoid this, is giving it content-type "application/octet-stream".

Is that the preferred way to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

仙女 2024-08-22 05:12:44

不,内容类型应该保持原样,正确指示类型。

该弹出窗口可能来自 Microsoft Office,它尝试以读/写模式打开文档。我认为这取决于 Office 版本,它的工作原理以及如何禁用它(因此您可能可以在 MSDN 上找到答案)。

No, the content type should stay what it is, correctly indicating the type.

The popup likely comes from Microsoft Office, which tries to open the document in read/write mode. I think it depends on the Office version how this works exactly, and how it could be disabled (so you'll probably can find the answer somewhere on MSDN).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文