--- Wiggins d'Anconia <[EMAIL PROTECTED]> wrote:
<snip>
> 
> In one my libraries I use,
> 
> my %header_options = ( -Content_Type   =>
> 'application/octet-stream',
>                        -Content_Length =>
> $content_length,
>                      );
> 
> if (defined $self->{'filename'} and
> $self->{'filename'} ne '') {
>     $header_options{-Content_Disposition} =
> "attachment;
> filename=\"$self->{'filename'}\"";
> }
> 
> It seems to have worked for me. Obviously you need
> to replace
> $self->{'filename'} with your variable, and
> preferably set
> $content_length with the file size.
> 
> HTH,
> 
> http://danconia.org
> 

I just tried it by doing this:

print header(-type=>'application/octet-stream',
             -attachment=>'SampleListingUpload.csv');

And it works for me.  I didn't set the content length
because I don't know what the syntax is doing it this
way, and there wasn't an example in the for it in the
cpan cgi doc.  

Someone said that the content-disposition wasn't
standard, so I thought this way would be better.  Does
anyone see any issues doing it this way?

thanks,
Denzil


                
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to