Subject: | Missing first file for multiple file upload |
Hi,
When I try to upload multiple files, the very first file is always missing.
Code:
If I have a form that uploads 3 files,
<form name="f" method="post" enctype="multipart/form-data" action="files.modcgi">
<input type="file" name="file1"><br>
<input type="file" name="file2"><br>
<input type="file" name="file3"><br>
<input type="submit">
</form>
Using a "for" loop like this:
for my $upload ($apr->upload) {
...
}
, I am only able to retrieve "file2" and "file3". "file1" seems to be missing.
However, if I do this "my $upload1 = $apr->upload;" before the above "for" loop, I am able to retrieve the first file.
Please advise. Thanks!
Regards