• 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
FileDownload
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FileDownload


  • Subject: FileDownload
  • From: "Richard Bruch" <email@hidden>
  • Date: Sat, 15 Nov 2003 21:09:55 +0100

Hello Kranthi,

supposed you have an object "data" with data loaded from the desired server file
you can build a WOResponse object and return it as result of a given direct
action.

        r.setHeader(data.getMimetype(),"content-type");
        r.setHeader("attachment;
filename=\""+data.getFilename()+"\"","content-disposition");
  if(data.stringData != null) // data is in a string
   r.appendContentString(data.stringData.toString());
  else // data is in an NSData instance
         r.appendContentData(data.getRawData());

Regards,

Richard
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: FileDownload
      • From: Kaj Hejer <email@hidden>
  • Prev by Date: Subclassing WOImage
  • Next by Date: Re: "Cannot obtain globalId for an object which..."
  • Previous by thread: Re: [newbie]request in a direct action
  • Next by thread: Re: FileDownload
  • Index(es):
    • Date
    • Thread