thanks for the response,
If I type in the external URL in the browser's address bar, then I do
get the file save dialog box.
So I presume that the external server, is indeed setting the desired header.
but when I redirect to that URL from within a wicket application, I
can't seem to get the
save dialog box.
I'll try and capture headers in both cases, and compare.
I suppose me setting the header on the web response object, and then
redirecting
won't do any good.
I can construct a URL resource stream target from the external url and
use that
instead of RedirectRequestTarget, but that would mean, processing that
11MB of file,
thru the wicket application, which I want to avoid.
thanks
Igor Vaynberg wrote:
whatever streams that external file has to set a
content-disposition:attachment header so the browser pops up that box.
-igor
On 8/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I see that DownloadLink can be used to stream a File.
What I want to do is use DownLoadLink to redirect to an external URL
that should be streamed (i.e. File Save box should pop up).
I can't use ExternalLink as the external URL's location is not pre
determined,
also the external URL's location lookup is a costly so I don't want to do
it unless
the User clicks on a link.
So in my case I do some thing like
class DownloadUrlLink {
onClick() {
URL externalUrl = getExternalURL(); //this is a costly operation, so I
don't want to do it unless user clicks the Download link.
getRequestCycle().setRequestTarget(new RedirectRequestTarget(url.toString
()));
}
}
The URL points to a rather large gzipped XML file about 11MB in size.
But instead of popping up a File Save dialog, the browser starts to
display the XML file.
and CPU usage jumps up to 100%, on account of the file being this large.
Is there a way to force the browser to pop up a FileSave dialog when using
RedirectRequestTarget
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]