"Cash, Robert" wrote:
> 
> I believe I have solved the problem using the following code:
> 
>   $filereq = "myfile.exe";         #name of file you want in save as box
>   $file = "c:\\temp\\myfile.exe";  #path and name of file to send
>    open (BFILE,"$file") ;
>    binmode BFILE;
>    $size= -s BFILE;
>    print "Content: $filereq\r\n";
>    print "Content-Type: application/octet-stream\r\n";
>    print "Content-Length: $size\n";
>    print "Content-Disposition: attachment\; filename=$filereq\r\n\r\n";
> 
>    while(<BFILE>){
>         print $_;
>      }
>    close BFILE;
> 
>   In reading a Microsoft TechNet article the trick is not to include the
> file path in the "Content-Disposition" statement and not in quotes.

Don't forget to binmode STDOUT if you have non-text files.

-- 
  ,-/-  __      _  _         $Bill Luebkert   ICQ=14439852
 (_/   /  )    // //       DBE Collectibles   http://www.todbe.com/
  / ) /--<  o // //      Mailto:[EMAIL PROTECTED] http://dbecoll.webjump.com/
-/-' /___/_<_</_</_    http://www.freeyellow.com/members/dbecoll/
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to