In article <[EMAIL PROTECTED]>, Steve Hay wrote:
> --------------000705070203000702050302
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> 
> Hi,
> 
> I'm trying to figure out a good way to download dynamically generated 
> files (mainly PDF files and ZIP files) using CGI-Application.

I've done this before. Here's how I did it:

print $self->query->header(
    -type=>'application/vnd.ms-excel',
    -attachment=> "file.xls",
);

# print file to stdout here...

exit;

##########

Sure, I've broken a couple of C::A rules by printing and exiting in the run
mode, but I think the code is clearer and easier to maintain than trying 
follow the C::A structure to the letter and have a result is more complicated
to implement and understand.

        Mark

-- 
 . . . . . . . . . . . . . . . . . . . . . . . . . . . 
   Mark Stosberg            Principal Developer  
   [EMAIL PROTECTED]     Summersault, LLC     
   765-939-9301 ext 202     database driven websites
 . . . . . http://www.summersault.com/ . . . . . . . .


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

Reply via email to