Skip to content

Commit e7d4968

Browse files
committed
Merge branch 'master' of github.com:UniSharp/laravel-filemanager
2 parents 89049f9 + f1fad46 commit e7d4968

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

src/config/lfm.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,16 @@
150150
'ppt' => 'fa-file-powerpoint-o',
151151
'pptx' => 'fa-file-powerpoint-o',
152152
],
153+
154+
/*
155+
|--------------------------------------------------------------------------
156+
| php.ini override
157+
|--------------------------------------------------------------------------
158+
*/
159+
// These values override your php.ini settings before uploading files
160+
// Set these to false to ingnore and apply your php.ini settings
161+
'php_ini_overrides' => [
162+
'memory_limit' => '256M'
163+
]
164+
153165
];

src/controllers/LfmController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class LfmController extends Controller
1414

1515
public function __construct()
1616
{
17+
$this->applyIniOverrides();
18+
1719
if (!$this->isProcessingImages() && !$this->isProcessingFiles()) {
1820
throw new \Exception('unexpected type parameter');
1921
}

src/traits/LfmHelpers.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,13 @@ public function enabledShareFolder()
235235
{
236236
return config('lfm.allow_share_folder') === true;
237237
}
238+
239+
public function applyIniOverrides()
240+
{
241+
foreach (config('lfm.php_ini_overrides') as $key => $value) {
242+
if ($value && $value != 'false') ini_set($key, $value);
243+
}
244+
}
238245

239246

240247
/****************************

0 commit comments

Comments
 (0)