hi Eric,
thank's for answer. i'll try and let you know if it works.
bye
Eric Dobbs wrote:
>
>> Fabio Daprile wrote:
>>
>> I've another little problem regarding download.
>> I use a RawScreen (Download.vm) and my files are stored in a MySql DB,
>> in a BLOB field.
>> It does work when you only display the file, the problem raises when you
>> try to save this file.
>>
>> hereafter how i call that page:
>> <a
>> href="$link.setPage("Download.vm").addQueryData("attachid",
>> "$Attachment.getId()")">$Attachment.getFilename()</A>
>>
>> and here how is et the headers:
>>
>> resp.setContentType(_attach.getContenttype());
>> resp.setContentLength(_attach.getContent().length);
>> resp.setHeader("Content-Disposition", "attachment");
>> resp.setHeader("filename", _attach.getFilename());
>>
>> The name of the file becomes "Download", the realname is lost.
>>
>> How is it possible to keep the name of the file.
>
>
>
> We've used a line like this to set the Content-Disposition with the
> file name: (I think the line break is important, but can't remember
> for sure)
>
> data.getResponse().setHeader("Content-Disposition", "inline;
> filename=<filename here>");
>
> for your example that would be:
> resp.setHeader("Content-Disposition", "inline;
> filename=" + _attach.getFilename());
>
> Hope that helps.
> -Eric
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
--
--
Fabio Daprile
W�rth-Phoenix Srl
Via Kravogl 4, I-39100 Bolzano
Tel: +39 0471/564111 - (direct 564070)
Fax: +39 0471/564122
mailto:[EMAIL PROTECTED]
http://www.wuerth-phoenix.com
http://www.wuerth.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>