[xwiki-dev] Why do we use Content-Disposition with inline mode in DownloadAction?
Ludovic Dubost
ludovic at xwiki.com
Fri Feb 9 22:23:30 CET 2007
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 xwiki-dev at objectweb.org mailing list.
> To unsubscribe: mailto:xwiki-dev-unsubscribe at objectweb.org
> For general help: mailto:sympa at 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
More information about the devs
mailing list