mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 06:08:21 +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 #7233: Mobile view: enlarge images in gallery preview of entries for the wall stream
|
||||||
- Enh #7237: Changed PoweredBy URL
|
- Enh #7237: Changed PoweredBy URL
|
||||||
- Enh #7238: Fixed PHP warning related to `.env`
|
- Enh #7238: Fixed PHP warning related to `.env`
|
||||||
|
- Enh #7240: Fixed maximum file size setting in initialization
|
||||||
|
|
||||||
1.16.3 (Unreleased)
|
1.16.3 (Unreleased)
|
||||||
--------------------------
|
--------------------------
|
||||||
|
@ -88,10 +88,12 @@ class FileSettingsForm extends Model
|
|||||||
$fileSizeKey = 'post_max_size';
|
$fileSizeKey = 'post_max_size';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$maxUploadSizeInMb = $maxUploadSize / 1024 / 1024;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
$fileSizeKey,
|
$fileSizeKey,
|
||||||
floor($maxUploadSize / 1024 / 1024),
|
$maxUploadSizeInMb,
|
||||||
min($maxUploadSize, 64),
|
min($maxUploadSizeInMb, 64),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class InitialData
|
|||||||
|
|
||||||
// File
|
// File
|
||||||
[,,$defaultMaxUploadSize] = FileSettingsForm::getPHPMaxUploadSize();
|
[,,$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');
|
Yii::$app->getModule('file')->settings->set('excludeMediaFilesPreview', '1');
|
||||||
|
|
||||||
// Caching
|
// Caching
|
||||||
|
Loading…
x
Reference in New Issue
Block a user