Hi:
In EplSite WorkFlow i am using this routine and works fine:
use CGI;
$query = new CGI;
if( $file = $query->param('ImageName') )
{
@thefile = split(/\\/,$file);
$elements = @thefile;
$thedocument = "[EMAIL PROTECTED]";
$thedocument =~ s/\s/_/g;
if( open (OUTFILE,">$globalp->{Documents_path}/$thedocument") )
{
binmode(OUTFILE);# Explicit binary mode
while ($bytesread=read($fdat{attachthis},$buffer,32768))
{
print OUTFILE $buffer;
}
close(OUTFILE);
}
}
I am using CGI for some manipulation on filename but you could not use it.
I hope this helps
Carlos Kassab
> Hi, I have this script.
>
> <FORM METHOD="POST" ENCTYPE="multipart/form-data">
> <input TYPE="FILE" NAME="ImageName" >
> </FORM>
>
> [-
>
> if (defined $fdat{ImageName}) {
> open FILE, "> test ;
> print FILE $buffer
> while read($fdat{ImageName}, $buffer, 32768);
> close FILE;
> }
>
> -]
>
> File test exist but have size 0 k.
> I have Embperl v 1.3.6.
>
> Thanks, Rado
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]