Hi! As I said on the other mail, the culprit was found! :)
I have a component called DownloadFileToDiskComponent that has an element inside. The element appends the file data to the response, and modified the header exactly like those two lines, except the content-type is being defined based on the file name extension. The component itself has just the element inside. I use the component so I can do something like:
DownloadFileToDiskComponent component = (DownloadFileToDiskComponent) pageWithName ("DownloadFileToDiskComponent"); component.setFilePk( currentDownload().file().fileDataID().toString () );
return component;Ie, to be able to have the setter and treat this in a relatively cool way (don't ask about the toString part ;) ).
Yours Miguel Arroz On 2007/10/12, at 21:21, Mike Schrag wrote:
My problem is in the content type. On the element code, I do: response.setHeader(contentType, "Content-Type");Where exactly are you doing this? You mention have a component with another component in it that sets the content type. But if you're sending an xls back, that needs to come from a component that is ONLY sending back XLS for the entire page. Just clarifying ... You can't have like HTML components at the top and then some XLS in the middle. Incidentally, I use:response.setHeader("application/pdf; name=\"" + filename + "\"", "Content-Type"); response.setHeader("attachment; filename=\"" + filename + "\"", "Content-Disposition");ms _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/arroz% 40guiamac.comThis email sent to [EMAIL PROTECTED]
Miguel Arroz http://www.terminalapp.net http://www.ipragma.com
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
