99In ` config/lfm.php ` :
1010
1111``` php
12+ /*
13+ |--------------------------------------------------------------------------
14+ | Routing
15+ |--------------------------------------------------------------------------
16+ */
17+
18+ // Include to pre-defined routes from package or not. Middlewares
19+ 'use_package_routes' => true,
20+
21+ // Middlewares which should be applied to all package routes.
22+ // For laravel 5.1 and before, remove 'web' from the array.
23+ 'middlewares' => ['web','auth'],
24+
25+ // The url to this package. Change it if necessary.
26+ 'prefix' => 'laravel-filemanager',
27+
28+ /*
29+ |--------------------------------------------------------------------------
30+ | Multi-User Mode
31+ |--------------------------------------------------------------------------
32+ */
33+
34+ // If true, private folders will be created for each signed-in user.
35+ 'allow_multi_user' => true,
36+
37+ // The database column to identify a user. Make sure the value is unique.
38+ // Ex: When set to 'id', the private folder of user will be named as the user id.
39+ 'user_field' => 'id',
40+
41+ /*
42+ |--------------------------------------------------------------------------
43+ | Working Directory
44+ |--------------------------------------------------------------------------
45+ */
46+
47+ // Which folder to store files in project, fill in 'public', 'resources', 'storage' and so on.
48+ // You should create routes to serve images if it is not set to public.
49+ 'base_directory' => 'public',
50+
51+ 'images_folder_name' => 'photos',
52+ 'files_folder_name' => 'files',
53+
54+ 'shared_folder_name' => 'shares',
55+ 'thumb_folder_name' => 'thumbs',
56+
57+ /*
58+ |--------------------------------------------------------------------------
59+ | Startup Views
60+ |--------------------------------------------------------------------------
61+ */
62+
63+ // The default display type for items.
64+ // Supported: "grid", "list"
65+ 'images_startup_view' => 'grid',
66+ 'files_startup_view' => 'list',
67+
68+ /*
69+ |--------------------------------------------------------------------------
70+ | Upload / Validation
71+ |--------------------------------------------------------------------------
72+ */
73+
1274// If true, the uploaded file will be renamed to uniqid() + file extension.
13- 'rename_file' => false,
75+ 'rename_file' => false,
1476
1577// If rename_file set to false and this set to true, then non-alphanumeric characters in filename will be replaced.
1678'alphanumeric_filename' => true,
17- // If true, non-alphanumeric folder name will not be allowed.
18- 'alphanumeric_directory' => false,
19-
20- 'use_package_routes' => true,
21-
22- // For laravel 5.1, please set to ['auth']
23- 'middlewares' => ['web','auth'],
24-
25- // Add prefix for routes
26- 'prefix' => 'laravel-filemanager',
27-
28- // Allow multi_user mode or not.
29- // If true, laravel-filemanager create private folders for each signed-in user.
30- 'allow_multi_user' => true,
3179
32- // The database field to identify a user.
33- // When set to 'id', the private folder will be named as the user id.
34- // NOTE: make sure to use an unique field.
35- 'user_field' => 'id',
36-
37- 'base_directory' => 'public',
38-
39- 'images_folder_name' => 'photos',
40- 'files_folder_name' => 'files',
41-
42- 'shared_folder_name' => 'shares',
43- 'thumb_folder_name' => 'thumbs',
44-
45- // When choosing a startup view you can fill either 'grid' or 'list'.
46- 'images_startup_view' => 'list',
47- 'files_startup_view' => 'list',
80+ // If true, non-alphanumeric folder name will be rejected.
81+ 'alphanumeric_directory' => false,
4882
4983'max_image_size' => 500,
5084'max_file_size' => 1000,
@@ -68,8 +102,13 @@ In `config/lfm.php` :
68102 'text/plain',
69103],
70104
71- // file extensions array, only for showing file information, it won't affect the upload process.
72- 'file_type_array' => [
105+ /*
106+ |--------------------------------------------------------------------------
107+ | File Extension Information
108+ |--------------------------------------------------------------------------
109+ */
110+
111+ 'file_type_array' => [
73112 'pdf' => 'Adobe Acrobat',
74113 'doc' => 'Microsoft Word',
75114 'docx' => 'Microsoft Word',
@@ -84,8 +123,7 @@ In `config/lfm.php` :
84123 'pptx' => 'Microsoft PowerPoint',
85124],
86125
87- // file extensions array, only for showing icons, it won't affect the upload process.
88- 'file_icon_array' => [
126+ 'file_icon_array' => [
89127 'pdf' => 'fa-file-pdf-o',
90128 'doc' => 'fa-file-word-o',
91129 'docx' => 'fa-file-word-o',
0 commit comments