You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by e....@teamconcepts.gr on 2019/09/18 15:09:23 UTC

DownloadLink ContentDisposition

Hi all,

I have a quick question (I hope)

I wanted to display a PDF file from the file system directly in the
browser.
The first solution I used was based on the article "AJAX update and file
download in one blow" from the wiki, changing the ContentDisposition to
INLINE, in the onRequest() method of the AJAXDownload.

AJAX was too much for my task, so I dug further and discovered that
ContentDisposition is also set in the onClick() method of DownloadLink.
So I just brutally copied DownloadLink to a new class, and changed
ContentDisposition from ATTACHMENT to INLINE.

But, this left me wondering: Is there any reason why ContentDisposition is
not user controllable in DownloadLink, just like cacheDuration ?

Thanks,

Elias




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DownloadLink ContentDisposition

Posted by e....@teamconcepts.gr.
I thought so, but on the other hand, the problem gets solved without much
hassle.
I have created the pull request.

Thank you,
Elias


"Sven Meier" <sv...@meiers.net> wrote on 18/09/2019 07:55:08 μμ:

> "Sven Meier" <sv...@meiers.net>
> 18/09/2019 07:55 μμ
>
> Please respond to
> users@wicket.apache.org
>
> To
>
> users@wicket.apache.org
>
> cc
>
> Subject
>
> Re: DownloadLink ContentDisposition
>
> Hi,
>
> IMHO "download" sort of implies that the file is downloaded and not
> shown inline.
>
> But feel free to create a pull request to make that configurable.
>
> Have fun
> Sven
>
>
> On 18.09.19 17:09, e.spyrop.w@teamconcepts.gr wrote:
> > Hi all,
> >
> > I have a quick question (I hope)
> >
> > I wanted to display a PDF file from the file system directly in the
> > browser.
> > The first solution I used was based on the article "AJAX update and
file
> > download in one blow" from the wiki, changing the ContentDisposition to
> > INLINE, in the onRequest() method of the AJAXDownload.
> >
> > AJAX was too much for my task, so I dug further and discovered that
> > ContentDisposition is also set in the onClick() method of DownloadLink.
> > So I just brutally copied DownloadLink to a new class, and changed
> > ContentDisposition from ATTACHMENT to INLINE.
> >
> > But, this left me wondering: Is there any reason why ContentDisposition
is
> > not user controllable in DownloadLink, just like cacheDuration ?
> >
> > Thanks,
> >
> > Elias
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DownloadLink ContentDisposition

Posted by Sven Meier <sv...@meiers.net>.
Hi,

IMHO "download" sort of implies that the file is downloaded and not 
shown inline.

But feel free to create a pull request to make that configurable.

Have fun
Sven


On 18.09.19 17:09, e.spyrop.w@teamconcepts.gr wrote:
> Hi all,
>
> I have a quick question (I hope)
>
> I wanted to display a PDF file from the file system directly in the
> browser.
> The first solution I used was based on the article "AJAX update and file
> download in one blow" from the wiki, changing the ContentDisposition to
> INLINE, in the onRequest() method of the AJAXDownload.
>
> AJAX was too much for my task, so I dug further and discovered that
> ContentDisposition is also set in the onClick() method of DownloadLink.
> So I just brutally copied DownloadLink to a new class, and changed
> ContentDisposition from ATTACHMENT to INLINE.
>
> But, this left me wondering: Is there any reason why ContentDisposition is
> not user controllable in DownloadLink, just like cacheDuration ?
>
> Thanks,
>
> Elias
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org