• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Download opens directly in browser... not in Save As panel...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Apple KBase as a web service
  • Next by Date: NSData Constructor
  • Previous by thread: Re: Apple KBase as a web service
  • Next by thread: NSData Constructor
  • Index(es):
    • Date
    • Thread