X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a6c6c6e300c60e4dd2b02501c827571da1adf1be..refs/pull/957/head:/app/Services/UploadService.php diff --git a/app/Services/UploadService.php b/app/Services/UploadService.php index 44d4bb4f7..df597a40f 100644 --- a/app/Services/UploadService.php +++ b/app/Services/UploadService.php @@ -11,11 +11,6 @@ class UploadService */ protected $fileSystem; - /** - * @var FileSystemInstance - */ - protected $storageInstance; - /** * FileService constructor. @@ -32,15 +27,10 @@ class UploadService */ protected function getStorage() { - if ($this->storageInstance !== null) return $this->storageInstance; - $storageType = config('filesystems.default'); - $this->storageInstance = $this->fileSystem->disk($storageType); - - return $this->storageInstance; + return $this->fileSystem->disk($storageType); } - /** * Check whether or not a folder is empty. * @param $path @@ -52,13 +42,4 @@ class UploadService $folders = $this->getStorage()->directories($path); return (count($files) === 0 && count($folders) === 0); } - - /** - * Check if using a local filesystem. - * @return bool - */ - protected function isLocal() - { - return strtolower(config('filesystems.default')) === 'local'; - } -} \ No newline at end of file +}