Hello,
after uploading a screenshort as rather small png-File and using it embedded as <img> (which doesn't trigger the problem), I figured it would be nice to have a full size version opening up when clicking on the thumbnail. So I uploaded a full size version as well.
But when I get the pop-up (simple target="_blank" link, nothing special), I'm presented with the choice to view (with the browser) or save the png file, as if this was some kind of attachment. Looking into the http-headers I found the Content-disposition header set to "attachment" (function imce_file_download in imce.module), which is wrong IMO. Removing the Content-Disposition header fixes the problem, which btw shows up both in Opera and in Firefox, haven't found time to test it in IE6/7, but I guess it's the same there.
Test page (which still sends the Content-Disposition header) is at http://linux.spiney.org/debian_linux_maemo_nokia_770_winzig_port, click the screenshot to get the view/save dialog.
Trivial patch is attached, but I I'd like to know why you put the Content-Disposition header into the reply in the first place, is there any specific reason for this? I can understand it for non-graphics files (hence I left the second Content-Disposition header in place, but for gif/jpg/png it's natural to let the browser do the work, isn't it?
Kind regards
Wolfgang Karall
| Comment | File | Size | Author |
|---|---|---|---|
| imce.content-disposition.diff | 714 bytes | spiney@linux.spiney.org |
Comments
Comment #1
ufku commentedyes you're right. actually i dont remember why i put "attachment" there but i think it could be intented to be "inline". as you say, removing it could be a better idea to make the browser handle it.
thanks.
Comment #2
ufku commentedcommited.
Comment #3
spiney@linux.spiney.org commentedthanks
Comment #4
(not verified) commented