From 991f7426e8ec2a566ad82043b22ce844a5a1cfa1 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 12 Feb 2017 13:34:56 -0500 Subject: Improve error reporting when file upload is not configured properly --- app/ServiceProvider/ClassProvider.php | 5 --- app/ServiceProvider/ObjectStorageProvider.php | 51 +++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 app/ServiceProvider/ObjectStorageProvider.php (limited to 'app/ServiceProvider') diff --git a/app/ServiceProvider/ClassProvider.php b/app/ServiceProvider/ClassProvider.php index 50ce531f..d66794df 100644 --- a/app/ServiceProvider/ClassProvider.php +++ b/app/ServiceProvider/ClassProvider.php @@ -4,7 +4,6 @@ namespace Kanboard\ServiceProvider; use Pimple\Container; use Pimple\ServiceProviderInterface; -use Kanboard\Core\ObjectStorage\FileStorage; use Kanboard\Core\Paginator; use Kanboard\Core\Http\OAuth2; use Kanboard\Core\Tool; @@ -178,10 +177,6 @@ class ClassProvider implements ServiceProviderInterface return new HttpClient($c); }; - $container['objectStorage'] = function () { - return new FileStorage(FILES_DIR); - }; - $container['cspRules'] = array( 'default-src' => "'self'", 'style-src' => "'self' 'unsafe-inline'", diff --git a/app/ServiceProvider/ObjectStorageProvider.php b/app/ServiceProvider/ObjectStorageProvider.php new file mode 100644 index 00000000..a108345f --- /dev/null +++ b/app/ServiceProvider/ObjectStorageProvider.php @@ -0,0 +1,51 @@ +