Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use Mojolicious::Lite;
- my @ext = qw/.jpg/;
- # /foo?user=sri
- post '/foo' => sub {
- my $c = shift @_;
- my @files = $c->req->upload('file');
- my @file_names;
- foreach my $id (@files) {
- my $i=0;
- $file_names[$i] = $id->filename;
- $i++;
- }
- $c->render(text => "File names => @file_names");
- };
- app->start;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement