是什么决定下载的文件是保存为只读还是读写? [英] What determines if a downloaded file should be saved as read-only or read-write?

查看:333
本文介绍了是什么决定下载的文件是保存为只读还是读写?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您在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?

推荐答案

唯一 Content-Disposition 标题字段的指定参数是 filename 创建日期修改日期读取日期尺寸。您可以使用自定义参数(请参阅 参数语法的ABNF ),但除非他们在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.

这篇关于是什么决定下载的文件是保存为只读还是读写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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