]> BookStack Code Mirror - bookstack/blobdiff - app/Services/UploadService.php
Updated Spanish translation
[bookstack] / app / Services / UploadService.php
index 028e78bea998ee763e373cef12b5b894d353c0f4..df597a40fef5dbcb79bac610caabf8528ae0d525 100644 (file)
@@ -11,11 +11,6 @@ class UploadService
      */
     protected $fileSystem;
 
-    /**
-     * @var FileSystemInstance
-     */
-    protected $storageInstance;
-
 
     /**
      * FileService constructor.
@@ -32,12 +27,8 @@ 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);
     }
 
     /**
@@ -51,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
+}