lfm.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Documentation for this config :
  5. |--------------------------------------------------------------------------
  6. | online => http://unisharp.github.io/laravel-filemanager/config
  7. | offline => vendor/unisharp/laravel-filemanager/docs/config.md
  8. */
  9. return [
  10. /*
  11. |--------------------------------------------------------------------------
  12. | Routing
  13. |--------------------------------------------------------------------------
  14. */
  15. 'use_package_routes' => true,
  16. /*
  17. |--------------------------------------------------------------------------
  18. | Shared folder / Private folder
  19. |--------------------------------------------------------------------------
  20. |
  21. | If both options are set to false, then shared folder will be activated.
  22. |
  23. */
  24. 'allow_private_folder' => true,
  25. // Flexible way to customize client folders accessibility
  26. // If you want to customize client folders, publish tag="lfm_handler"
  27. // Then you can rewrite userField function in App\Handler\ConfigHandler class
  28. // And set 'user_field' to App\Handler\ConfigHandler::class
  29. // Ex: The private folder of user will be named as the user id.
  30. 'private_folder_name' => UniSharp\LaravelFilemanager\Handlers\ConfigHandler::class,
  31. 'allow_shared_folder' => true,
  32. 'shared_folder_name' => 'shares',
  33. /*
  34. |--------------------------------------------------------------------------
  35. | Folder Names
  36. |--------------------------------------------------------------------------
  37. */
  38. 'folder_categories' => [
  39. 'file' => [
  40. 'folder_name' => 'files',
  41. 'startup_view' => 'grid',
  42. 'max_size' => 50000, // size in KB
  43. 'valid_mime' => [
  44. 'image/jpeg',
  45. 'image/pjpeg',
  46. 'image/png',
  47. 'image/gif',
  48. 'image/svg+xml',
  49. ],
  50. ],
  51. 'image' => [
  52. 'folder_name' => 'photos',
  53. 'startup_view' => 'list',
  54. 'max_size' => 50000, // size in KB
  55. 'valid_mime' => [
  56. 'image/jpeg',
  57. 'image/pjpeg',
  58. 'image/png',
  59. 'image/gif',
  60. 'image/svg+xml',
  61. 'application/pdf',
  62. 'text/plain',
  63. ],
  64. ],
  65. ],
  66. /*
  67. |--------------------------------------------------------------------------
  68. | Pagination
  69. |--------------------------------------------------------------------------
  70. */
  71. 'paginator' => [
  72. 'perPage' => 30,
  73. ],
  74. /*
  75. |--------------------------------------------------------------------------
  76. | Upload / Validation
  77. |--------------------------------------------------------------------------
  78. */
  79. 'disk' => 'public',
  80. 'rename_file' => false,
  81. 'alphanumeric_filename' => false,
  82. 'alphanumeric_directory' => false,
  83. 'should_validate_size' => false,
  84. 'should_validate_mime' => false,
  85. // behavior on files with identical name
  86. // setting it to true cause old file replace with new one
  87. // setting it to false show `error-file-exist` error and stop upload
  88. 'over_write_on_duplicate' => false,
  89. /*
  90. |--------------------------------------------------------------------------
  91. | Thumbnail
  92. |--------------------------------------------------------------------------
  93. */
  94. // If true, image thumbnails would be created during upload
  95. 'should_create_thumbnails' => true,
  96. 'thumb_folder_name' => 'thumbs',
  97. // Create thumbnails automatically only for listed types.
  98. 'raster_mimetypes' => [
  99. 'image/jpeg',
  100. 'image/pjpeg',
  101. 'image/png',
  102. ],
  103. 'thumb_img_width' => 200, // px
  104. 'thumb_img_height' => 200, // px
  105. /*
  106. |--------------------------------------------------------------------------
  107. | File Extension Information
  108. |--------------------------------------------------------------------------
  109. */
  110. 'file_type_array' => [
  111. 'pdf' => 'Adobe Acrobat',
  112. 'doc' => 'Microsoft Word',
  113. 'docx' => 'Microsoft Word',
  114. 'xls' => 'Microsoft Excel',
  115. 'xlsx' => 'Microsoft Excel',
  116. 'zip' => 'Archive',
  117. 'gif' => 'GIF Image',
  118. 'jpg' => 'JPEG Image',
  119. 'jpeg' => 'JPEG Image',
  120. 'png' => 'PNG Image',
  121. 'ppt' => 'Microsoft PowerPoint',
  122. 'pptx' => 'Microsoft PowerPoint',
  123. ],
  124. /*
  125. |--------------------------------------------------------------------------
  126. | php.ini override
  127. |--------------------------------------------------------------------------
  128. |
  129. | These values override your php.ini settings before uploading files
  130. | Set these to false to ingnore and apply your php.ini settings
  131. |
  132. | Please note that the 'upload_max_filesize' & 'post_max_size'
  133. | directives are not supported.
  134. */
  135. 'php_ini_overrides' => [
  136. 'memory_limit' => '256M',
  137. ],
  138. ];