filesystems.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?php
  2. /*
  3. * This file is part of the Jiannei/lumen-api-starter.
  4. *
  5. * (c) Jiannei <longjian.huang@foxmail.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. return [
  11. /*
  12. |--------------------------------------------------------------------------
  13. | Default Filesystem Disk
  14. |--------------------------------------------------------------------------
  15. |
  16. | Here you may specify the default filesystem disk that should be used
  17. | by the framework. The "local" disk, as well as a variety of cloud
  18. | based disks are available to your application. Just store away!
  19. |
  20. */
  21. 'default' => env('FILESYSTEM_DRIVER', 'public'),
  22. /*
  23. |--------------------------------------------------------------------------
  24. | Default Cloud Filesystem Disk
  25. |--------------------------------------------------------------------------
  26. |
  27. | Many applications store files both locally and in the cloud. For this
  28. | reason, you may specify a default "cloud" driver here. This driver
  29. | will be bound as the Cloud disk implementation in the container.
  30. |
  31. */
  32. 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
  33. /*
  34. |--------------------------------------------------------------------------
  35. | Filesystem Disks
  36. |--------------------------------------------------------------------------
  37. |
  38. | Here you may configure as many filesystem "disks" as you wish, and you
  39. | may even configure multiple disks of the same driver. Defaults have
  40. | been setup for each driver as an example of the required options.
  41. |
  42. | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
  43. |
  44. */
  45. 'disks' => [
  46. 'local' => [
  47. 'driver' => 'local',
  48. 'root' => storage_path('app'),
  49. ],
  50. 'public' => [
  51. 'driver' => 'local',
  52. 'root' => storage_path('app/public'),
  53. 'url' => env('APP_URL') . '/storage',
  54. 'visibility' => 'public',
  55. ],
  56. 'data' => [
  57. 'driver' => 'local',
  58. 'root' => base_path('data'),
  59. 'url' => env('APP_URL') . '/storage',
  60. 'visibility' => 'public',
  61. ],
  62. 's3' => [
  63. 'driver' => 's3',
  64. 'key' => env('AWS_ACCESS_KEY_ID'),
  65. 'secret' => env('AWS_SECRET_ACCESS_KEY'),
  66. 'region' => env('AWS_DEFAULT_REGION'),
  67. 'bucket' => env('AWS_BUCKET'),
  68. 'url' => env('AWS_URL'),
  69. 'endpoint' => env('AWS_ENDPOINT'),
  70. ],
  71. 'qiniu' => [
  72. 'driver' => 'qiniu',
  73. 'access_key' => env('QINIU_ACCESS_KEY', 'lO_k2PCnrzHMT7cfT54tDQMa1O0srXQru74dcT-B'),
  74. 'secret_key' => env('QINIU_SECRET_KEY', 'YgUCzW1gEtEh3nUl4Uq6C-GtyZMIXrQXQzzQ01Zb'),
  75. 'bucket' => env('QINIU_BUCKET', 'xmnk'),
  76. 'url' => 'http://v.xmnk.cn/',
  77. 'domain' => env('QINIU_DOMAIN', 'http://v.xmnk.cn'), // or host: https://xxxx.clouddn.com
  78. ],
  79. ],
  80. //额外前缀
  81. 'dir_prefix' => env('DIR_PREFIX', '')
  82. ];