Mumia, thanks for your suggestion. Unfortunately, it didn't work; the
file in /tmp/ on the server is still empty and the attachment received
was only 64 bytes and was completely empty, as opposed to my previous
solution, which at least contained the file path and name.

Thanks, again, for trying.

-Kevin

-----Original Message-----
From: Mumia W. [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 22, 2007 3:27 PM
To: Beginners List
Subject: Re: File uploading using CGI

On 02/22/2007 12:58 PM, Zembower, Kevin wrote:
> I'm having problems uploading a file with perl and CGI.pm. I have a
form
> that uses a script with CGI and MIME::Lite to email the contents of
the
> form and the file uploaded to an individual. I've written this section
> so far:
> [...]
> 
>    $msg->attach(Type        =>'BINARY',
>                 Data        =>$tmp_file_name,
>                 Filename    =>'AttachedFile',
>                 Disposition =>'attachment');
> [...]

"Data => $tmp_file_name" submits the temporary file's name as the data. 
You probably want to specify $tmp_file_name as the path to the file
instead:

Path => $tmp_file_name,

Re-read the first few examples in "perldoc MIME::Lite" again.

HTH




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

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


Reply via email to