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 $file (@$files) {
- push @file_names, $file->filename;
- }
- $c->render(text => "File names => @file_names");
- };
- app->start;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement