Hi,
I needed to be able to force content:disposition as inline for a recent project.
It's a pretty short patch which lets you pass ?download=0 on the query string to force a link to open inline.
Any chance of getting this into the module?
| Comment | File | Size | Author |
|---|---|---|---|
| allow-passing-inline-disposition.patch | 681 bytes | samhassell |
Comments
Comment #1
samhassell commentedpatch attached.
Comment #2
arski commentedhmm, what would this do, would this force the browser to open the file inside the window instead of downloading it? Does this override the default browser settings. I'm asking because if it doesn't then this sounds equivalent to the default behaviour without the module.
Comment #3
samhassell commentedYep it would force the browser to open the file in the browser.
It seems to override the browser settings, at least in Chrome.
My implementation is in a modal popup offering the user to either download or open in place a file. Without being able to set inline, Chrome is downloading from both links.
Its a valid header according to the RFC at http://www.ietf.org/rfc/rfc2183.txt
Comment #4
arski commentedHm, well, I don't see any harm in introducing this to the module. However, if that were to happen, then basically all the formatters should be duplicated with the inline version (which could use download=0) for example. I don't want to set the disposition header to "inline" by default, because that would mean that enabling this module alone will mess with the default Drupal settings, which is not something I would want to happen.
Technically this is easy, my only concern is that duplicating all the formatters in CCK field displays and Views might result in overly long selection list and thus have an averse impact on usability.. hmm
Comment #5
arski commentedOK, so basically I just adopted your patch.. don't really see the need for inline formatters throughout, unless someone explicitly requests them.. So just use download=0 to force inline disposition. (new release coming up soon, in dev for now)
Comment #6
arski commentedwops
Comment #7
samhassell commentedmuch appreciated :)