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->uploads;
- my @file_names;
- foreach my $id (@$files) {
- my $i=0;
- $file_names[$i] = $id->filename;
- $i++;
- }
- my $file_1 = $files->[0]->filename;
- $c->render(text => "First file => $file_1 ; FIle names -> @file_names");
- };
- app->start;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement