@@ -17,6 +17,10 @@ In `config/lfm.php` :
1717// The url to this package. Change it if necessary.
1818'prefix' => 'laravel-filemanager',
1919
20+ // The prefix of urls to non-public files, for exmaple if: base_directory !== 'public'
21+ // Without slashes
22+ 'urls_prefix' => '',
23+
2024/*
2125|--------------------------------------------------------------------------
2226| Multi-User Mode
@@ -25,10 +29,15 @@ In `config/lfm.php` :
2529
2630// If true, private folders will be created for each signed-in user.
2731'allow_multi_user' => true,
32+ // If true, share folder will be created when allow_multi_user is true.
33+ 'allow_share_folder' => true,
2834
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',
35+ // Flexibla way to customize client folders accessibility
36+ // Ex: The private folder of user will be named as the user id.
37+ // You cant use a closure when using the optimized config file (in Laravel 5.2 anyway)
38+ 'user_field' => function() {
39+ return auth()->user()->id;
40+ },
3241
3342/*
3443|--------------------------------------------------------------------------
@@ -72,15 +81,22 @@ In `config/lfm.php` :
7281// If true, non-alphanumeric folder name will be rejected.
7382'alphanumeric_directory' => false,
7483
75- 'max_image_size' => 500,
76- 'max_file_size' => 1000,
84+ // If true, the uploading file's size will be verified for over than max_image_size/max_file_size.
85+ 'should_validate_size' => false,
86+
87+ 'max_image_size' => 50000,
88+ 'max_file_size' => 50000,
89+
90+ // If true, the uploading file's mime type will be valid in valid_image_mimetypes/valid_file_mimetypes.
91+ 'should_validate_mime' => false,
7792
7893// available since v1.3.0
7994'valid_image_mimetypes' => [
8095 'image/jpeg',
8196 'image/pjpeg',
8297 'image/png',
83- 'image/gif'
98+ 'image/gif',
99+ 'image/svg+xml',
84100],
85101
86102// available since v1.3.0
@@ -90,10 +106,20 @@ In `config/lfm.php` :
90106 'image/pjpeg',
91107 'image/png',
92108 'image/gif',
109+ 'image/svg+xml',
93110 'application/pdf',
94111 'text/plain',
95112],
96113
114+ /*
115+ |--------------------------------------------------------------------------
116+ | Image / Folder Setting
117+ |--------------------------------------------------------------------------
118+ */
119+
120+ 'thumb_img_width' => 200,
121+ 'thumb_img_height' => 200,
122+
97123/*
98124|--------------------------------------------------------------------------
99125| File Extension Information
@@ -129,4 +155,28 @@ In `config/lfm.php` :
129155 'ppt' => 'fa-file-powerpoint-o',
130156 'pptx' => 'fa-file-powerpoint-o',
131157],
158+
159+ /*
160+ |--------------------------------------------------------------------------
161+ | php.ini override
162+ |--------------------------------------------------------------------------
163+ */
164+ // These values override your php.ini settings before uploading files
165+ // Set these to false to ingnore and apply your php.ini settings
166+ 'php_ini_overrides' => [
167+ 'memory_limit' => '256M'
168+ ],
132169```
170+
171+ ## Caveats
172+ ### php.ini overrides
173+
174+ The php_ini_overrides are applied on every request the filemanager does and are reset once the script has finished executing.
175+ This has one drawback: any ini settings that you might want to change that apply to the request itself will not work.
176+
177+ For example, overriding these settings will not work:
178+ * upload_max_filesize
179+ * post_max_size
180+
181+ ** Why this is expected behaviour:**
182+ upload_max_filesize and post_max_size will get set but uploaded files are already passed to your PHP script before the settings are changed.
0 commit comments