Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: CGI, uploading multiple files

by edimusrex (Monk)
on Mar 13, 2017 at 20:21 UTC ( #1184474=note: print w/replies, xml ) Need Help??


in reply to Re^3: CGI, uploading multiple files
in thread CGI, uploading multiple files

that just created empty files with the correct names.

Replies are listed 'Best First'.
Re^5: CGI, uploading multiple files
by poj (Abbot) on Mar 13, 2017 at 22:12 UTC
    Try
    #my @files = $q->param('multi_files'); my @files = $q->upload('multi_files'); foreach my $upload (@files){ print "Upload this please -- $upload<br>"; #my $upload_file = $q->upload($upload); if ($upload){ open (OUTFILE,">$upload_folder/$upload") or die $!;; binmode OUTFILE; while (<$upload>) { print OUTFILE; } close OUTFILE; } else { print "<b>Guess it's broken</b><br/>"; } }
    poj

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1184474]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2021-09-24 16:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?