Update src/Module/Media/Photo/Upload.php

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
MarekBenjamin 2022-11-30 18:16:42 +01:00 committed by GitHub
parent 79235b6db1
commit f9c0d5a14b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,7 +169,7 @@ class Upload extends \Friendica\BaseModule
$width = $image->getWidth();
$height = $image->getHeight();
$maximagesize = Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize'));
$maximagesize = Strings::getBytesFromShorthand($this->config->get('system', 'maximagesize'));
if ($maximagesize && $filesize > $maximagesize) {
// Scale down to multiples of 640 until the maximum size isn't exceeded anymore