filesystems.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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('DANGEROUSLY_SET_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. 'permissions' => [
  42. 'file' => [
  43. 'public' => 0644,
  44. 'private' => 0600,
  45. ],
  46. 'dir' => [
  47. 'public' => 0755,
  48. 'private' => 0700,
  49. ],
  50. ],
  51. ],
  52. 'public' => [
  53. 'driver' => 'local',
  54. 'root' => storage_path('app/public'),
  55. 'url' => env('APP_URL').'/storage',
  56. 'visibility' => 'public',
  57. 'throw' => true,
  58. ],
  59. 's3' => [
  60. 'driver' => 's3',
  61. 'key' => env('AWS_ACCESS_KEY_ID'),
  62. 'secret' => env('AWS_SECRET_ACCESS_KEY'),
  63. 'region' => env('AWS_DEFAULT_REGION'),
  64. 'bucket' => env('AWS_BUCKET'),
  65. 'visibility' => env('AWS_VISIBILITY', 'public'),
  66. 'url' => env('AWS_URL'),
  67. 'endpoint' => env('AWS_ENDPOINT'),
  68. 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
  69. 'throw' => true,
  70. ],
  71. 'alt-primary' => [
  72. 'enabled' => env('ALT_PRI_ENABLED', false),
  73. 'driver' => 's3',
  74. 'key' => env('ALT_PRI_AWS_ACCESS_KEY_ID'),
  75. 'secret' => env('ALT_PRI_AWS_SECRET_ACCESS_KEY'),
  76. 'region' => env('ALT_PRI_AWS_DEFAULT_REGION'),
  77. 'bucket' => env('ALT_PRI_AWS_BUCKET'),
  78. 'visibility' => 'public',
  79. 'url' => env('ALT_PRI_AWS_URL'),
  80. 'endpoint' => env('ALT_PRI_AWS_ENDPOINT'),
  81. 'use_path_style_endpoint' => env('ALT_PRI_AWS_USE_PATH_STYLE_ENDPOINT', false),
  82. 'throw' => true,
  83. ],
  84. 'alt-secondary' => [
  85. 'enabled' => env('ALT_SEC_ENABLED', false),
  86. 'driver' => 's3',
  87. 'key' => env('ALT_SEC_AWS_ACCESS_KEY_ID'),
  88. 'secret' => env('ALT_SEC_AWS_SECRET_ACCESS_KEY'),
  89. 'region' => env('ALT_SEC_AWS_DEFAULT_REGION'),
  90. 'bucket' => env('ALT_SEC_AWS_BUCKET'),
  91. 'visibility' => 'public',
  92. 'url' => env('ALT_SEC_AWS_URL'),
  93. 'endpoint' => env('ALT_SEC_AWS_ENDPOINT'),
  94. 'use_path_style_endpoint' => env('ALT_SEC_AWS_USE_PATH_STYLE_ENDPOINT', false),
  95. 'throw' => true,
  96. ],
  97. 'spaces' => [
  98. 'driver' => 's3',
  99. 'key' => env('DO_SPACES_KEY'),
  100. 'secret' => env('DO_SPACES_SECRET'),
  101. 'endpoint' => env('DO_SPACES_ENDPOINT'),
  102. 'region' => env('DO_SPACES_REGION'),
  103. 'bucket' => env('DO_SPACES_BUCKET'),
  104. 'visibility' => 'public',
  105. 'options' => [
  106. 'CacheControl' => 'max-age=31536000'
  107. ],
  108. 'root' => env('DO_SPACES_ROOT',''),
  109. 'throw' => true,
  110. 'url' => env('AWS_URL'),
  111. ],
  112. 'backup' => [
  113. 'driver' => env('PF_BACKUP_DRIVER', 's3'),
  114. 'visibility' => 'private',
  115. 'root' => env('PF_BACKUP_DRIVER', 'local') == 'local' ?
  116. storage_path('app/backups/') :
  117. env('PF_BACKUP_ROOT','/'),
  118. 'key' => env('PF_BACKUP_KEY'),
  119. 'secret' => env('PF_BACKUP_SECRET'),
  120. 'endpoint' => env('PF_BACKUP_ENDPOINT'),
  121. 'region' => env('PF_BACKUP_REGION'),
  122. 'bucket' => env('PF_BACKUP_BUCKET'),
  123. ],
  124. ],
  125. ];