in reply to Multiple File upload script
Second, you get the remote filename with param. Then change this into the local filename.<input type="file" name="file1">
Third, you get the filehande with upload:my $filename = $cgi->param('file1');
Fourth, get the uploaded Content-Type (has absolutely ntohing to do with the page's Content-Type) with uploadInfomy $fh = $cgi->upload('file1');
I would suggest writing a function that handles a single file upload. And then call it multiple times for each file param in the form.my $content_type = $cgi->uploadInfo($filename)->{'Content-Type'};
upload_file('file1'); upload_fiel('file2'); sub upload_file { my ($param_name) = @_;
|
|---|