FileDownload
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.