什么决定了下载的文件应保存为只读还是读写?

发布于 2024-09-25 09:05:42 字数 116 浏览 1 评论 0原文

当您在http响应流(Servlet等)或使用Content-disposition标头写入一些二进制数据时,决定下载的文件是保存为只读还是具有写入权限的因素是什么?我们如何控制是否使其只读?该浏览器/操作系统依赖吗?

When you write some binary data in the http response stream (of Servlet etc) or using the Content-disposition header, what is the factor that determines whether the downloaded file is saved as readonly or has write permissions ? How can we control whether to make it read-only or not? Is that browser/OS dependant?

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

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

发布评论

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

评论(1

尬尬 2024-10-02 09:05:42

Content-Disposition 标头字段的唯一指定参数分别是文件名创建日期修改日期读取日期大小.您可以使用自定义参数(请参阅ABNF of 参数语法),但除非在 IANA 注册,否则用户代理可能不会支持它们。

因此,不,目前无法设置诸如只读之类的访问属性。

The only specified parameters for the Content-Disposition header field are filename, creation-date, modification-date, read-date, and size. You may use custom parameters (see ABNF of parameter syntax), but they are will probably not be supported by user agents unless they are registered with the IANA.

So, no, it is currently not possible to set access properties like read only.

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