X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/349162ea139556b2d25e09e155cec84e21cc9227..refs/pull/2515/head:/app/Uploads/AttachmentService.php diff --git a/app/Uploads/AttachmentService.php b/app/Uploads/AttachmentService.php index e85901e17..b14f49473 100644 --- a/app/Uploads/AttachmentService.php +++ b/app/Uploads/AttachmentService.php @@ -2,17 +2,29 @@ use BookStack\Exceptions\FileUploadException; use Exception; +use Illuminate\Contracts\Filesystem\Factory as FileSystem; +use Illuminate\Contracts\Filesystem\Filesystem as FileSystemInstance; use Illuminate\Support\Str; use Symfony\Component\HttpFoundation\File\UploadedFile; -class AttachmentService extends UploadService +class AttachmentService { + protected $fileSystem; + + /** + * AttachmentService constructor. + */ + public function __construct(FileSystem $fileSystem) + { + $this->fileSystem = $fileSystem; + } + + /** * Get the storage that will be used for storing files. - * @return \Illuminate\Contracts\Filesystem\Filesystem */ - protected function getStorage() + protected function getStorage(): FileSystemInstance { $storageType = config('filesystems.attachments');