From 3bb9ef5b5595fc833a65129d9d81977662e561d9 Mon Sep 17 00:00:00 2001 From: Denis Fedoseev Date: Mon, 31 Jul 2017 20:21:03 +0300 Subject: [PATCH] comment --- fotostore.pl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/fotostore.pl b/fotostore.pl index a3a559d..46ce772 100755 --- a/fotostore.pl +++ b/fotostore.pl @@ -145,6 +145,7 @@ get '/' => sub { } => 'index'; # Upload image file +# There is no restriction for file size in app because restriction is present in nginx configuration post '/upload' => ( authenticated => 1 ) => sub { my $self = shift; @@ -163,17 +164,6 @@ post '/upload' => ( authenticated => 1 ) => sub { ); } - # Upload max size - #my $upload_max_size = 3 * 1024 * 1024; - - # Over max size - #if ($image->size > $upload_max_size) { - # return $self->render( - # template => 'error', - # message => "Upload fail. Image size is too large." - # ); - #} - # Check file type my $image_type = $image->headers->content_type; my %valid_types = map { $_ => 1 } qw(image/gif image/jpeg image/png);