From: Marius Gavrilescu Date: Sat, 8 Feb 2014 21:55:51 +0000 (+0200) Subject: Fix file submit X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=95a9ad1be9a7e32f642d469acb006990c2b86151;p=plack-app-gruntmaster.git Fix file submit --- diff --git a/lib/Gruntmaster/Page/Submit.pm b/lib/Gruntmaster/Page/Submit.pm index b08399e..0159a9d 100644 --- a/lib/Gruntmaster/Page/Submit.pm +++ b/lib/Gruntmaster/Page/Submit.pm @@ -27,7 +27,7 @@ sub generate{ my ($problem, $format, $contest, $private, $prog) = map {scalar $r->param($_)} 'problem', 'prog_format', 'contest', 'private', 'source_code'; my $upload = $r->upload('prog'); if (defined $upload) { - my $temp = read_file $upload->filename; + my $temp = read_file $upload->path; $prog = $temp if $temp } die if defined $contest && $contest !~ /^\w+$/ ;