Added Strings::getBytesFromShorthand() for file size check at upload and new message.po

This commit is contained in:
Marek Bachmann 2022-11-30 01:22:38 +01:00
parent c03784eaa9
commit 978fe26f4c
2 changed files with 259 additions and 254 deletions

View File

@ -654,7 +654,7 @@ function photos_post(App $a)
Logger::info('photos: upload: received file: ' . $filename . ' as ' . $src . ' ('. $type . ') ' . $filesize . ' bytes');
$maximagesize = DI::config()->get('system', 'maximagesize');
$maximagesize = Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize'));
if ($maximagesize && ($filesize > $maximagesize)) {
DI::sysmsg()->addNotice(DI::l10n()->t('Image exceeds size limit of %s', Strings::formatBytes($maximagesize)));

File diff suppressed because it is too large Load Diff