diff options
author | Dave Arter <davea@mysociety.org> | 2019-08-06 16:48:19 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2019-08-16 16:16:34 +0100 |
commit | bc05c15122a8032866fdb53d285d99b3e48b3e28 (patch) | |
tree | f83741db24e8187dcf9c075c2d06e42a0711a2c9 | |
parent | e13c2a88e875b549624df0d1ad46bb0e2e121653 (diff) |
Add Open311::always_upload_photos flag to send all photos, not just private
This is intended to be used by Westminster, but not quite yet.
-rw-r--r-- | perllib/FixMyStreet/SendReport/Open311.pm | 1 | ||||
-rw-r--r-- | perllib/Open311.pm | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm index 45b056dc2..fcb6f7298 100644 --- a/perllib/FixMyStreet/SendReport/Open311.pm +++ b/perllib/FixMyStreet/SendReport/Open311.pm @@ -30,6 +30,7 @@ sub send { extended_description => 1, multi_photos => 0, upload_files => 0, + always_upload_photos => 0, fixmystreet_body => $body, ); diff --git a/perllib/Open311.pm b/perllib/Open311.pm index 8ef1a4f2c..07f659c0b 100644 --- a/perllib/Open311.pm +++ b/perllib/Open311.pm @@ -35,6 +35,7 @@ has extended_statuses => ( is => 'ro', isa => Bool, default => 0 ); has always_send_email => ( is => 'ro', isa => Bool, default => 0 ); has multi_photos => ( is => 'ro', isa => Bool, default => 0 ); has upload_files => ( is => 'ro', isa => Bool, default => 0 ); +has always_upload_photos => ( is => 'ro', isa => Bool, default => 0 ); has use_customer_reference => ( is => 'ro', isa => Bool, default => 0 ); has mark_reopen => ( is => 'ro', isa => Bool, default => 0 ); has fixmystreet_body => ( is => 'ro', isa => InstanceOf['FixMyStreet::DB::Result::Body'] ); @@ -218,7 +219,7 @@ sub _populate_service_request_uploads { } } - if ( $problem->photo && $problem->non_public ) { + if ( $self->always_upload_photos || ( $problem->photo && $problem->non_public ) ) { # open311-adapter won't be able to download any photos if they're on # a private report, so instead of sending the media_url parameter # send the actual photo content with the POST request. |