Switch to our own internals for local storage
The local storage driver is not suitable because it does not apply the appropriate permissions to local files. This is a big issue especially for shared hosting where the webserver will create a file and the owner is locked from touching it. We detect the local driver and use the FileHelper class whenever a file or directory is created. Eg: if configured to apply chmod 777 then it will be fulfilled as expected.
This commit is contained in:
parent
cb39d41a09
commit
027af0dd9f
|
|
@ -17,14 +17,18 @@ class File extends FileBase
|
|||
*/
|
||||
protected $table = 'system_files';
|
||||
|
||||
//
|
||||
// Configuration
|
||||
//
|
||||
/**
|
||||
* If working with local storage, determine the absolute local path.
|
||||
*/
|
||||
protected function getLocalRootPath()
|
||||
{
|
||||
return Config::get('filesystems.disks.local.root', storage_path().'/app');
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the public address for the storage path.
|
||||
*/
|
||||
public function getPublicDirectory()
|
||||
public function getPublicPath()
|
||||
{
|
||||
$uploadsPath = Config::get('cms.uploadsPath', '/storage/app/uploads');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue