aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Model
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2018-09-26 16:37:40 +0100
committerDave Arter <davea@mysociety.org>2018-09-28 16:19:47 +0100
commit561e01b9b51b62e2566d80cd63d308f9a4f82822 (patch)
treea5f5a9254e3c3f1536a7300b45582ad2ceae51d8 /perllib/FixMyStreet/App/Model
parent9b2b8675f6dfa22c45d609349f97730a33c975d3 (diff)
Factor out photo storage backend init checks
Diffstat (limited to 'perllib/FixMyStreet/App/Model')
-rw-r--r--perllib/FixMyStreet/App/Model/PhotoSet.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Model/PhotoSet.pm b/perllib/FixMyStreet/App/Model/PhotoSet.pm
index 58e1a135d..21bde52d8 100644
--- a/perllib/FixMyStreet/App/Model/PhotoSet.pm
+++ b/perllib/FixMyStreet/App/Model/PhotoSet.pm
@@ -16,6 +16,8 @@ use IPC::Cmd qw(can_run);
use IPC::Open3;
use MIME::Base64;
+use FixMyStreet::PhotoStorage;
+
has c => (
is => 'ro',
);
@@ -65,10 +67,7 @@ has storage => (
is => 'ro',
lazy => 1,
default => sub {
- my $class = 'FixMyStreet::PhotoStorage::';
- $class .= FixMyStreet->config('PHOTO_STORAGE_BACKEND') || 'FileSystem';
- eval "use $class";
- return $class->new();
+ return FixMyStreet::PhotoStorage::backend;
}
);