Skip to content

Commit

Permalink
added redirect to upload example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 22, 2012
1 parent efc4414 commit b1abaaf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Mojolicious/Lite.pm
Expand Up @@ -674,11 +674,11 @@ into a temporary file.
if $self->req->is_limit_exceeded;
# Process uploaded file
if (my $example = $self->param('example')) {
my $size = $example->size;
my $name = $example->filename;
$self->render(text => "Thanks for uploading $size byte file $name.");
}
return $self->redirect_to('form')
unless my $example = $self->param('example');
my $size = $example->size;
my $name = $example->filename;
$self->render(text => "Thanks for uploading $size byte file $name.");
};
app->start;
Expand Down

0 comments on commit b1abaaf

Please sign in to comment.