Download opens directly in browser... not in Save As panel...
Download opens directly in browser... not in Save As panel...
- Subject: Download opens directly in browser... not in Save As panel...
- From: Erwin <email@hidden>
- Date: Fri, 22 Oct 2004 19:15:52 +0200
I succesfully implemented a WOComponent to download pictures after conversions.
As recommended in various fiscussions, in a DirectAction I build the response headers.
.......
aResponse.setHeader(contentType, "content-type");
aResponse.disableClientCaching();
aResponse.removeHeadersForKey("Cache-Control");
aResponse.removeHeadersForKey("pragma");
.....
aResponse.setContentStream(new FileInputStream(f), bufferSize, (int) f.length());
...
aResponse.setHeader("attachment; filename="+fileName, "content-disposition");
<x-tad-smaller> As Iwould like to immediately prompt the user to save the file directly to the user's disk with a Save as panel, without opening it in the browser, I use the "content-disposition" and "attachment"....
but in Safari the pictures opens directly in the browser ..... (I am in development phase, not deployment)
Did I miss ant important directive in my header ?
Erwin
</x-tad-smaller> _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden