On Feb 9, 2007, at 10:23 PM, Ludovic Dubost wrote:
Hi,
If I recall correctly we do this because otherwise you will trigger
a download for embedded gifs and jpegs !
Also to make it switch to the right file name but that's not the
"inline" part.
Ah ok I understand why it's working. So the browser always tries to
display the content on the page but for some mime types it doesn't
know how to display them and thus prompts a dialog box.
Thanks for the gif/jpg/png/etc hint!
I'll document it...
Thanks
-Vincent
Vincent Massol a écrit :
Hi there,
I'm trying to fix some issue and I'd like to understand why we
have the following in DownloadAction:
String ofilename = XWiki.getURLEncoded
(attachment.getFilename()).replaceAll("\\+", " ");
response.addHeader("Content-disposition", "inline;
filename=\"" + ofilename + "\"");
response.setDateHeader("Last-Modified", attachment.getDate
().getTime());
To my knowledge, "inline" means that we're giving an indication to
the browser so that it does NOT to bring up a "Save As..." dialog
box.
However my understanding is that when the user uses the /download/
action the attachment is bringing up a Save dialog box.
So 2 questions:
1) Why do we use inline?
2) Why is it working? :)
Thanks
-Vincent
_____________________________________________________________________
______Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo!
Mail et son interface révolutionnaire.
http://fr.mail.yahoo.com
---------------------------------------------------------------------
---
--
You receive this message as a subscriber of the xwiki-
dev(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://
www.objectweb.org/wws
--
Ludovic Dubost
Blog:
http://www.ludovic.org/blog/
XWiki:
http://www.xwiki.com
Skype: ldubost GTalk: ldubost AIM: nvludo Yahoo: ludovic
--
You receive this message as a subscriber of the xwiki-
dev(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/
wws
___________________________________________________________________________
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface
révolutionnaire.
http://fr.mail.yahoo.com