views:

23

answers:

2

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?

+2  A: 

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.

Gumbo
A: 

The HTTP headers as far as I am aware cannot specify whether a file must be read only or not. Most files that are held on the server are read only (i.e. you cannot modify a file as a user from a website), but once downloaded you can do what you like with it.

The read/write attribute is determined by the file system itself. So, unfortunately, this is not possible.

Codemwnci