filesystems.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Default Filesystem Disk
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here you may specify the default filesystem disk that should be used
  9. | by the framework. The "local" disk, as well as a variety of cloud
  10. | based disks are available to your application. Just store away!
  11. |
  12. */
  13. 'default' => env('FILESYSTEM_DRIVER', 'local'),
  14. /*
  15. |--------------------------------------------------------------------------
  16. | Default Cloud Filesystem Disk
  17. |--------------------------------------------------------------------------
  18. |
  19. | Many applications store files both locally and in the cloud. For this
  20. | reason, you may specify a default "cloud" driver here. This driver
  21. | will be bound as the Cloud disk implementation in the container.
  22. |
  23. */
  24. 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
  25. /*
  26. |--------------------------------------------------------------------------
  27. | Filesystem Disks
  28. |--------------------------------------------------------------------------
  29. |
  30. | Here you may configure as many filesystem "disks" as you wish, and you
  31. | may even configure multiple disks of the same driver. Defaults have
  32. | been setup for each driver as an example of the required options.
  33. |
  34. | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
  35. |
  36. */
  37. 'disks' => [
  38. 'local' => [
  39. 'driver' => 'local',
  40. 'root' => storage_path('app'),
  41. ],
  42. 'public' => [
  43. 'driver' => 'local',
  44. 'root' => public_path('/storage'),
  45. 'url' => '/storage',
  46. 'visibility' => 'public',
  47. ],
  48. 's3' => [
  49. 'driver' => 's3',
  50. 'key' => env('AWS_ACCESS_KEY_ID'),
  51. 'secret' => env('AWS_SECRET_ACCESS_KEY'),
  52. 'region' => env('AWS_DEFAULT_REGION'),
  53. 'bucket' => env('AWS_BUCKET'),
  54. 'url' => env('AWS_URL'),
  55. ],
  56. 'oss' => [
  57. 'driver' => 'oss',
  58. 'access_id' => env('ALI_OSS_ACCESS_ID',''), // <Your Aliyun OSS AccessKeyId>
  59. 'access_key' => env('ALI_OSS_ACCESS_KEY',''), // <Your Aliyun OSS AccessKeySecret>
  60. 'bucket' => env('ALI_OSS_BUCKET',''), // <OSS bucket name>
  61. 'endpoint' => 'oss-cn-chengdu.aliyuncs.com', // OSS 外网节点或自定义外部域名 <the endpoint of OSS, E.g: oss-cn-hangzhou.aliyuncs.com | custom domain, E.g:img.abc.com>
  62. //'endpoint_internal' => '<internal endpoint [OSS内网节点] 如:oss-cn-shenzhen-internal.aliyuncs.com>', // v2.0.4 新增配置属性,如果为空,则默认使用 endpoint 配置(由于内网上传有点小问题未解决,请大家暂时不要使用内网节点上传,正在与阿里技术沟通中)
  63. 'cdnDomain' => '', // 如果isCName为true, getUrl会判断cdnDomain是否设定来决定返回的url,如果cdnDomain未设置,则使用endpoint来生成url,否则使用cdn <CDN domain, cdn域名>
  64. 'ssl' => true, // true use https | false use http
  65. 'isCName' => false, // 是否使用自定义域名,true: 则Storage.url()会使用自定义的cdn或域名生成文件url, false: 则使用外部节点生成url
  66. 'debug' => false,
  67. ],
  68. ],
  69. ];