aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-04-08 21:11:48 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-04-08 22:05:21 +0100
commitb7099e8e513fe64ec183b1403515f46a7cc25f19 (patch)
tree8a0399a49f90acfe5b74cf19d86585cc050455d7 /perllib/Open311.pm
parent0802b7f04091c1022dce0d77cc806a46ecc4ebba (diff)
Add PNG image support.
Store image type along with hash in photo column, and use that when outputting images / generating URLs. Make sure all public photo URL generation goes through appropriate functions, and change temp URLs so the filename can be output directly from the list.
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r--perllib/Open311.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm
index e500219bc..fb793b027 100644
--- a/perllib/Open311.pm
+++ b/perllib/Open311.pm
@@ -345,7 +345,7 @@ sub _populate_service_request_update_params {
if ( $comment->photo ) {
my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker($comment->cobrand)->new();
my $email_base_url = $cobrand->base_url($comment->cobrand_data);
- my $url = $email_base_url . '/photo/c/' . $comment->id . '.full.jpeg';
+ my $url = $email_base_url . $comment->photos->[0]->{url_full};
$params->{media_url} = $url;
}