Added Strings::getBytesFromShorthand() for file size check at upload and new message.po
This commit is contained in:
parent
10e0672981
commit
e73451d89b
2 changed files with 259 additions and 254 deletions
|
@ -654,7 +654,7 @@ function photos_post(App $a)
|
||||||
|
|
||||||
Logger::info('photos: upload: received file: ' . $filename . ' as ' . $src . ' ('. $type . ') ' . $filesize . ' bytes');
|
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)) {
|
if ($maximagesize && ($filesize > $maximagesize)) {
|
||||||
DI::sysmsg()->addNotice(DI::l10n()->t('Image exceeds size limit of %s', Strings::formatBytes($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
Loading…
Reference in a new issue