Hi,
Sorry ....
Here is the HTML form informations
<form action="load.html" name="form1" method="post" enctype="multipart
+/form-data">
<table>
<tr class="cell4">
<td>Select EXCEL rate sheet</td>
<td><input type="file" name="file" value=""></td>
</tr>
<tr class="cell3">
<td> </td>
<td><input type="submit" name="upload" value="upload"></td>
</tr>
</table>
</form>
and Embperl code used is
if((defined $fdat{file} && $fdat{file}) && $fdat{upload}) {
$filename = "/tmp/sample.txt";
open (FILE, "> $filename") || die("open failed: $!");
while (read($fdat{file}, $buffer, 32768)) {
print FILE $buffer || die("print test: $!");
}
close FILE || die("close test: $!");
}
If we remove enctype="multipart/form-data" form property, can see the form data (filename) after submiting the page.
includng enctype="multipart/form-data" in form will give undef filename. Any idea?
thanks |