|
1 | 1 | <?php
|
2 | 2 |
|
3 | 3 | return [
|
| 4 | + /* |
| 5 | + |-------------------------------------------------------------------------- |
| 6 | + | Routing |
| 7 | + |-------------------------------------------------------------------------- |
| 8 | + */ |
| 9 | + |
| 10 | + // Include to pre-defined routes from package or not. Middlewares |
| 11 | + 'use_package_routes' => true, |
| 12 | + |
| 13 | + // Middlewares which should be applied to all package routes. |
| 14 | + // For laravel 5.1 and before, remove 'web' from the array. |
| 15 | + 'middlewares' => ['web','auth'], |
| 16 | + |
| 17 | + // The url to this package. Change it if necessary. |
| 18 | + 'prefix' => 'laravel-filemanager', |
| 19 | + |
| 20 | + /* |
| 21 | + |-------------------------------------------------------------------------- |
| 22 | + | Multi-User Mode |
| 23 | + |-------------------------------------------------------------------------- |
| 24 | + */ |
| 25 | + |
| 26 | + // If true, private folders will be created for each signed-in user. |
| 27 | + 'allow_multi_user' => true, |
| 28 | + |
| 29 | + // The database column to identify a user. Make sure the value is unique. |
| 30 | + // Ex: When set to 'id', the private folder of user will be named as the user id. |
| 31 | + 'user_field' => 'id', |
| 32 | + |
| 33 | + /* |
| 34 | + |-------------------------------------------------------------------------- |
| 35 | + | Working Directory |
| 36 | + |-------------------------------------------------------------------------- |
| 37 | + */ |
| 38 | + |
| 39 | + // Which folder to store files in project, fill in 'public', 'resources', 'storage' and so on. |
| 40 | + // You should create routes to serve images if it is not set to public. |
| 41 | + 'base_directory' => 'public', |
| 42 | + |
| 43 | + 'images_folder_name' => 'photos', |
| 44 | + 'files_folder_name' => 'files', |
| 45 | + |
| 46 | + 'shared_folder_name' => 'shares', |
| 47 | + 'thumb_folder_name' => 'thumbs', |
| 48 | + |
| 49 | + /* |
| 50 | + |-------------------------------------------------------------------------- |
| 51 | + | Startup Views |
| 52 | + |-------------------------------------------------------------------------- |
| 53 | + */ |
| 54 | + |
| 55 | + // The default display type for items. |
| 56 | + // Supported: "grid", "list" |
| 57 | + 'images_startup_view' => 'grid', |
| 58 | + 'files_startup_view' => 'list', |
| 59 | + |
| 60 | + /* |
| 61 | + |-------------------------------------------------------------------------- |
| 62 | + | Upload / Validation |
| 63 | + |-------------------------------------------------------------------------- |
| 64 | + */ |
| 65 | + |
4 | 66 | // If true, the uploaded file will be renamed to uniqid() + file extension.
|
5 |
| - 'rename_file' => false, |
| 67 | + 'rename_file' => false, |
6 | 68 |
|
7 | 69 | // If rename_file set to false and this set to true, then non-alphanumeric characters in filename will be replaced.
|
8 | 70 | 'alphanumeric_filename' => true,
|
9 |
| - // If true, non-alphanumeric folder name will not be allowed. |
10 |
| - 'alphanumeric_directory' => false, |
11 |
| - |
12 |
| - 'use_package_routes' => true, |
13 |
| - |
14 |
| - // For laravel 5.1, please set to ['auth'] |
15 |
| - 'middlewares' => ['web','auth'], |
16 |
| - |
17 |
| - // Add prefix for routes |
18 |
| - 'prefix' => 'laravel-filemanager', |
19 |
| - |
20 |
| - // Allow multi_user mode or not. |
21 |
| - // If true, laravel-filemanager create private folders for each signed-in user. |
22 |
| - 'allow_multi_user' => true, |
23 | 71 |
|
24 |
| - // The database field to identify a user. |
25 |
| - // When set to 'id', the private folder will be named as the user id. |
26 |
| - // NOTE: make sure to use an unique field. |
27 |
| - 'user_field' => 'id', |
28 |
| - |
29 |
| - 'base_directory' => 'public', |
30 |
| - |
31 |
| - 'images_folder_name' => 'photos', |
32 |
| - 'files_folder_name' => 'files', |
33 |
| - |
34 |
| - 'shared_folder_name' => 'shares', |
35 |
| - 'thumb_folder_name' => 'thumbs', |
36 |
| - |
37 |
| - // When choosing a startup view you can fill either 'grid' or 'list'. |
38 |
| - 'images_startup_view' => 'list', |
39 |
| - 'files_startup_view' => 'list', |
| 72 | + // If true, non-alphanumeric folder name will be rejected. |
| 73 | + 'alphanumeric_directory' => false, |
40 | 74 |
|
41 | 75 | 'max_image_size' => 500,
|
42 | 76 | 'max_file_size' => 1000,
|
|
60 | 94 | 'text/plain',
|
61 | 95 | ],
|
62 | 96 |
|
63 |
| - // file extensions array, only for showing file information, it won't affect the upload process. |
64 |
| - 'file_type_array' => [ |
| 97 | + /* |
| 98 | + |-------------------------------------------------------------------------- |
| 99 | + | File Extension Information |
| 100 | + |-------------------------------------------------------------------------- |
| 101 | + */ |
| 102 | + |
| 103 | + 'file_type_array' => [ |
65 | 104 | 'pdf' => 'Adobe Acrobat',
|
66 | 105 | 'doc' => 'Microsoft Word',
|
67 | 106 | 'docx' => 'Microsoft Word',
|
|
76 | 115 | 'pptx' => 'Microsoft PowerPoint',
|
77 | 116 | ],
|
78 | 117 |
|
79 |
| - // file extensions array, only for showing icons, it won't affect the upload process. |
80 |
| - 'file_icon_array' => [ |
| 118 | + 'file_icon_array' => [ |
81 | 119 | 'pdf' => 'fa-file-pdf-o',
|
82 | 120 | 'doc' => 'fa-file-word-o',
|
83 | 121 | 'docx' => 'fa-file-word-o',
|
|
0 commit comments