diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-03-08 14:05:01 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-03-08 14:05:01 +0000 |
commit | 1a5baa677635b0fb981bd4cf83e1843f8d5ef8ab (patch) | |
tree | f86ee8c99fd6269b925640dc2bb3ebb44ee279ce /perllib/FixMyStreet/App/Controller/Questionnaire.pm | |
parent | 410d1f1edc737d1d60e83f90053fe028eff3de30 (diff) |
Store full size photos that are uploaded on filesystem, put hash in database. Fixes #9, basics for #209 (needs light box adding).
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Questionnaire.pm')
-rwxr-xr-x | perllib/FixMyStreet/App/Controller/Questionnaire.pm | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Questionnaire.pm b/perllib/FixMyStreet/App/Controller/Questionnaire.pm index f0cb02115..6ed7ddd9d 100755 --- a/perllib/FixMyStreet/App/Controller/Questionnaire.pm +++ b/perllib/FixMyStreet/App/Controller/Questionnaire.pm @@ -205,10 +205,7 @@ sub submit_standard : Private { } ); if ( my $fileid = $c->stash->{upload_fileid} ) { - my $file = file( $c->config->{UPLOAD_CACHE}, "$fileid.jpg" ); - my $blob = $file->slurp; - $file->remove; - $update->photo($blob); + $update->photo( $fileid ); } $update->insert; } |