Re: File download question
Re: File download question
- Subject: Re: File download question
- From: Robert Walker <email@hidden>
- Date: Fri, 3 Feb 2006 10:47:00 -0500
Amedeo,
Here is what I do. The explanation is in the header comments:
http://homepage.mac.com/robertwalker1/.cv/robertwalker1/Sites/.Public/
FileDownloader.java-zip.zip
On Feb 3, 2006, at 10:37 AM, Amedeo Mantica wrote:
works, thanks!
but... now the browser always download the file even if is a
readable file... jpg, pdf...
for my needs is ok...other solutions?
Thanks
Amedeo
On 03/feb/06, at 15:56, Miguel Arroz wrote:
Hi!
Just add:
response.setHeader("attachment;filename=" + filePath, "Content-
Disposition");
Note that IE for Windows sends to the app the entire file path
(C:\DocumentsAndSomething\BlaBlaBla\theFile.txt) instead of just
the file name, as every other browsers does. You must take care of
that when storing the file name...
Yours
Miguel Arroz
On 2006/02/03, at 14:33, Amedeo Mantica wrote:
I people, I heve some files stoored into a Database
I store the FileName as String, the FileData as NSData anche the
Mime type as String...
Everything works fine...
I have a WOComponent with this method to display/download the page
public void appendToResponse(WOResponse response, WOContext
context)
{
response.setHeader(theMimeType,"content-type");
response.setContent(theFileData);
}
also this works very fine, but...
can I set the file name?... If I downlod the file, the name
become the hyperlink name like "1.3.6.9.0"
Thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40guiamac.com
This email sent to email@hidden
"The world lies in the hands of evil
And we pray it would last" -- Apocalyptica, Life Burns!
Miguel Arroz
http://www.ipragma.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
This email sent to email@hidden
_______________________________________________
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