Advertisement
Guest User

Untitled

a guest
Jul 15th, 2014
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use Mojolicious::Lite;
  2.  
  3. my @ext = qw/.jpg/;
  4. # /foo?user=sri
  5. post '/foo' => sub {
  6.  
  7.   my $c    = shift @_;
  8.   my $files = $c->req->uploads;
  9.   my @file_names;
  10.  
  11.   foreach my $file (@$files) {
  12.       push @file_names, $file->filename;
  13.   }
  14.  
  15.  
  16. $c->render(text => "File names => @file_names");
  17. };
  18. app->start;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement