2016-03-25 01:18:05 -07:00
|
|
|
<?php
|
|
|
|
|
2018-09-29 21:33:52 -07:00
|
|
|
$config = [
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Default Filesystem Disk
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Here you may specify the default filesystem disk that should be used
|
2018-09-29 21:33:52 -07:00
|
|
|
| by the framework. The "local" disk, as well as a variety of cloud
|
|
|
|
| based disks are available to your application. Just store away!
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2020-05-28 01:54:29 -07:00
|
|
|
'default' => env('PRIVATE_FILESYSTEM_DISK', 'local'),
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Default Cloud Filesystem Disk
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Many applications store files both locally and in the cloud. For this
|
|
|
|
| reason, you may specify a default "cloud" driver here. This driver
|
|
|
|
| will be bound as the Cloud disk implementation in the container.
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2018-09-29 21:33:52 -07:00
|
|
|
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Filesystem Disks
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Here you may configure as many filesystem "disks" as you wish, and you
|
|
|
|
| may even configure multiple disks of the same driver. Defaults have
|
|
|
|
| been setup for each driver as an example of the required options.
|
|
|
|
|
|
2018-09-29 21:33:52 -07:00
|
|
|
| Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
|
|
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
'disks' => [
|
|
|
|
|
|
|
|
'local' => [
|
|
|
|
'driver' => 'local',
|
2020-05-11 21:41:56 -07:00
|
|
|
'root' => storage_path(),
|
2016-03-25 01:18:05 -07:00
|
|
|
],
|
|
|
|
|
2018-09-29 21:33:52 -07:00
|
|
|
// This applies the LOCAL public only, not S3/FTP/etc
|
2020-05-11 21:41:56 -07:00
|
|
|
'local_public' => [
|
2018-09-29 21:33:52 -07:00
|
|
|
'driver' => 'local',
|
2020-02-11 20:22:55 -08:00
|
|
|
'root' => public_path('uploads'),
|
2019-12-04 15:23:49 -08:00
|
|
|
'url' => env('APP_URL').'/uploads',
|
2018-09-29 21:33:52 -07:00
|
|
|
'visibility' => 'public',
|
2018-07-25 07:27:31 -07:00
|
|
|
],
|
|
|
|
|
2020-05-28 01:54:29 -07:00
|
|
|
's3_public' => [
|
2016-03-25 01:18:05 -07:00
|
|
|
'driver' => 's3',
|
2020-05-27 02:30:43 -07:00
|
|
|
'key' => env('PUBLIC_AWS_ACCESS_KEY_ID'),
|
|
|
|
'secret' => env('PUBLIC_AWS_SECRET_ACCESS_KEY'),
|
|
|
|
'region' => env('PUBLIC_AWS_DEFAULT_REGION'),
|
|
|
|
'bucket' => env('PUBLIC_AWS_BUCKET'),
|
|
|
|
'url' => env('PUBLIC_AWS_URL'),
|
|
|
|
'root' => env('PUBLIC_AWS_BUCKET_ROOT'),
|
|
|
|
'visibility' => 'public'
|
2020-05-11 21:41:56 -07:00
|
|
|
],
|
|
|
|
|
|
|
|
's3_private' => [
|
2020-05-28 01:54:29 -07:00
|
|
|
// This bucket (if different than the 's3' bucket above) can be
|
|
|
|
// configured within AWS to *never* permit public documents
|
|
|
|
// For security reasons, its best to use separate buckets for
|
|
|
|
// public and private documents in S3
|
2020-05-11 21:41:56 -07:00
|
|
|
'driver' => 's3',
|
|
|
|
'key' => env('PRIVATE_AWS_ACCESS_KEY_ID'),
|
|
|
|
'secret' => env('PRIVATE_AWS_SECRET_ACCESS_KEY'),
|
|
|
|
'region' => env('PRIVATE_AWS_DEFAULT_REGION'),
|
|
|
|
'bucket' => env('PRIVATE_AWS_BUCKET'),
|
|
|
|
'url' => env('PRIVATE_AWS_URL'),
|
|
|
|
'root' => env('PRIVATE_AWS_BUCKET_ROOT'),
|
|
|
|
'visibility' => 'private'
|
2016-03-25 01:18:05 -07:00
|
|
|
],
|
|
|
|
|
2018-09-29 21:33:52 -07:00
|
|
|
'rackspace' => [
|
|
|
|
'driver' => 'rackspace',
|
|
|
|
'username' => env('RACKSPACE_USERNAME'),
|
|
|
|
'key' => env('RACKSPACE_KEY'),
|
|
|
|
'container' => env('RACKSPACE_CONTAINER'),
|
|
|
|
'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/',
|
|
|
|
'region' => env('RACKSPACE_REGION'),
|
|
|
|
'url_type' => env('RACKSPACE_URL_TYPE'),
|
|
|
|
],
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2020-08-28 14:10:43 -07:00
|
|
|
'backup' => [
|
|
|
|
'driver' => env('PRIVATE_FILESYSTEM_DISK', 'local'),
|
|
|
|
'root' => storage_path('app'),
|
|
|
|
],
|
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
],
|
|
|
|
|
|
|
|
];
|
2018-09-29 21:33:52 -07:00
|
|
|
|
2020-05-11 21:41:56 -07:00
|
|
|
// copy the selected PUBLIC_FILESYSTEM_DISK's configuration to the 'public' key for easy use
|
|
|
|
// (by default, the PUBLIC_FILESYSTEM DISK is 'local_public', in the public/uploads directory)
|
|
|
|
$config['disks']['public'] = $config['disks'][env('PUBLIC_FILESYSTEM_DISK','local_public')];
|
2018-09-29 21:33:52 -07:00
|
|
|
|
|
|
|
return $config;
|