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(); $width = $image->getWidth();
$height = $image->getHeight(); $height = $image->getHeight();
$maximagesize = Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')); $maximagesize = Strings::getBytesFromShorthand($this->config->get('system', 'maximagesize'));
if ($maximagesize && $filesize > $maximagesize) { if ($maximagesize && $filesize > $maximagesize) {
// Scale down to multiples of 640 until the maximum size isn't exceeded anymore // Scale down to multiples of 640 until the maximum size isn't exceeded anymore