From d402fe364e6f8a5580e41fe022e6abf8eb3ed92e Mon Sep 17 00:00:00 2001 From: Marek Bachmann Date: Fri, 25 Nov 2022 19:44:09 +0100 Subject: [PATCH] Show image size limit in Frio as "usagemessage" for photo_upload --- mod/photos.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod/photos.php b/mod/photos.php index e5a24d22a9..eff5daceb4 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -914,7 +914,9 @@ function photos_content(App $a) '$submit' => DI::l10n()->t('Submit'), ]); - $usage_message = ''; + $maximagesize_bytes = DI::config()->get('system', 'maximagesize'); + $maximagesize_Mbytes = ($maximagesize_bytes / (10**6)); + $usage_message = DI::l10n()->t('The maximum accepted image size is: ') . $maximagesize_Mbytes . ' MB'; $tpl = Renderer::getMarkupTemplate('photos_upload.tpl');