diff options
Diffstat (limited to 'app/Api/File.php')
-rw-r--r-- | app/Api/File.php | 10 |
1 files changed, 7 insertions, 3 deletions
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) |