mirror of
https://github.com/getgrav/grav.git
synced 2026-05-06 18:26:06 +02:00
Remove legacy media.upload_limit references
This commit is contained in:
@@ -109,9 +109,8 @@ class Config extends Data
|
||||
}
|
||||
}
|
||||
|
||||
// Override the media.upload_limit based on PHP values
|
||||
$upload_limit = Utils::getUploadLimit();
|
||||
$this->items['system']['media']['upload_limit'] = $upload_limit > 0 ? $upload_limit : 1024*1024*1024;
|
||||
// Legacy value - Override the media.upload_limit based on PHP values
|
||||
$this->items['system']['media']['upload_limit'] = Utils::getUploadLimit();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -107,10 +107,7 @@ trait FlexMediaTrait
|
||||
throw new RuntimeException(sprintf($language->translate('PLUGIN_ADMIN.FILEUPLOAD_UNABLE_TO_UPLOAD'), $filename, 'Bad filename'), 400);
|
||||
}
|
||||
|
||||
/** @var Config $config */
|
||||
$config = $grav['config'];
|
||||
$grav_limit = (int) $config->get('system.media.upload_limit', 0);
|
||||
|
||||
$grav_limit = Utils::getUploadLimit();
|
||||
if ($grav_limit > 0 && $uploadedFile->getSize() > $grav_limit) {
|
||||
throw new RuntimeException($language->translate('PLUGIN_ADMIN.EXCEEDED_GRAV_FILESIZE_LIMIT'), 400);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user