mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-31 15:24:31 +03:00
Ensured uploaded system images remain public
Also added tests to cover local_secure image storage. Fixes #725
This commit is contained in:
@ -14,10 +14,6 @@ class AttachmentService extends UploadService
|
||||
*/
|
||||
protected function getStorage()
|
||||
{
|
||||
if ($this->storageInstance !== null) {
|
||||
return $this->storageInstance;
|
||||
}
|
||||
|
||||
$storageType = config('filesystems.default');
|
||||
|
||||
// Override default location if set to local public to ensure not visible.
|
||||
@ -25,9 +21,7 @@ class AttachmentService extends UploadService
|
||||
$storageType = 'local_secure';
|
||||
}
|
||||
|
||||
$this->storageInstance = $this->fileSystem->disk($storageType);
|
||||
|
||||
return $this->storageInstance;
|
||||
return $this->fileSystem->disk($storageType);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user