[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] Sending file to the browser...


$self->header_props(-type=> 'application/vnd.ms-excel',
			-attachment=> 'foo.xls');

Works for us.


On Mon, 29 Nov 2004 15:26:20 -0500, Michael Graham <suppressed> wrote:
> 
> > Below I have pasted a run mode from one of my applications.  The sub
> > grabs a report from a database and then returns it to the user.  It
> > works fine under Firefox, but under IE I get a dialogue box asking
> > whether I want to save or open the file; if I choose to open the file it
> > isn't recognized as an Excel workbook, and if I choose to save it is
> > wants to save it as type .pl, based on the name of the instance script.
> >
> > Is there a way to fix this?
> 
> In addition to setting the type with the Content-Type header, you can
> also set the filename with:
> 
>     Content-Disposition: inline; filename=foo.xls
> 
> I think the header_add syntax would be:
> 
>     $self->header_add(
>         -content_disposition => 'inline; filename=foo.xls'
>     );
> 
> Maybe that will help?
> 
> Michael
> 
> --
> Michael Graham <suppressed>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> Web Archive:  http://www.mail-archive.com/suppressed/
>               http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
> To unsubscribe, e-mail: suppressed
> For additional commands, e-mail: suppressed
> 
>

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.