mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
File settings max size fix (#7240)
* File Settings size fix * File Settings size fix
This commit is contained in:
parent
73d2816840
commit
366823d3b1
@ -41,6 +41,7 @@ HumHub Changelog
|
||||
- Enh #7233: Mobile view: enlarge images in gallery preview of entries for the wall stream
|
||||
- Enh #7237: Changed PoweredBy URL
|
||||
- Enh #7238: Fixed PHP warning related to `.env`
|
||||
- Enh #7240: Fixed maximum file size setting in initialization
|
||||
|
||||
1.16.3 (Unreleased)
|
||||
--------------------------
|
||||
|
@ -88,10 +88,12 @@ class FileSettingsForm extends Model
|
||||
$fileSizeKey = 'post_max_size';
|
||||
}
|
||||
|
||||
$maxUploadSizeInMb = $maxUploadSize / 1024 / 1024;
|
||||
|
||||
return [
|
||||
$fileSizeKey,
|
||||
floor($maxUploadSize / 1024 / 1024),
|
||||
min($maxUploadSize, 64),
|
||||
$maxUploadSizeInMb,
|
||||
min($maxUploadSizeInMb, 64),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ class InitialData
|
||||
|
||||
// File
|
||||
[,,$defaultMaxUploadSize] = FileSettingsForm::getPHPMaxUploadSize();
|
||||
Yii::$app->getModule('file')->settings->set('maxFileSize', $defaultMaxUploadSize);
|
||||
Yii::$app->getModule('file')->settings->set('maxFileSize', $defaultMaxUploadSize * 1024 * 1024);
|
||||
Yii::$app->getModule('file')->settings->set('excludeMediaFilesPreview', '1');
|
||||
|
||||
// Caching
|
||||
|
Loading…
x
Reference in New Issue
Block a user