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. Ludovic 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 [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?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