From ad8fcf035ab92d8cd06179959000b9a1681b1505 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 22 Jan 2016 21:23:12 -0500 Subject: Add new API procedures for groups, roles and project permissions --- app/Api/File.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'app/Api/File.php') diff --git a/app/Api/File.php b/app/Api/File.php index be415ecb..269803e1 100644 --- a/app/Api/File.php +++ b/app/Api/File.php @@ -32,14 +32,18 @@ class File extends \Kanboard\Core\Base } } catch (ObjectStorageException $e) { $this->logger->error($e->getMessage()); + return ''; } - - return ''; } public function createFile($project_id, $task_id, $filename, $blob) { - return $this->file->uploadContent($project_id, $task_id, $filename, $blob); + try { + return $this->file->uploadContent($project_id, $task_id, $filename, $blob); + } catch (ObjectStorageException $e) { + $this->logger->error($e->getMessage()); + return false; + } } public function removeFile($file_id) -- cgit v1.2.3