diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 0463e681e..2da53762a 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -1650,11 +1650,11 @@ class ApiV1Controller extends Controller 'configuration' => [ 'media_attachments' => [ 'image_matrix_limit' => 16777216, - 'image_size_limit' => config('pixelfed.max_photo_size') * 1024, + 'image_size_limit' => config_cache('pixelfed.max_photo_size') * 1024, 'supported_mime_types' => explode(',', config('pixelfed.media_types')), 'video_frame_rate_limit' => 120, 'video_matrix_limit' => 2304000, - 'video_size_limit' => config('pixelfed.max_photo_size') * 1024, + 'video_size_limit' => config_cache('pixelfed.max_photo_size') * 1024, ], 'polls' => [ 'max_characters_per_option' => 50, diff --git a/app/Http/Controllers/ImportPostController.php b/app/Http/Controllers/ImportPostController.php index 55f575a6e..84f230622 100644 --- a/app/Http/Controllers/ImportPostController.php +++ b/app/Http/Controllers/ImportPostController.php @@ -179,7 +179,7 @@ class ImportPostController extends Controller 'required', 'file', $mimes, - 'max:' . config('pixelfed.max_photo_size') + 'max:' . config_cache('pixelfed.max_photo_size') ] ]); diff --git a/app/Util/Site/Config.php b/app/Util/Site/Config.php index 02944defe..038eef99e 100644 --- a/app/Util/Site/Config.php +++ b/app/Util/Site/Config.php @@ -30,7 +30,7 @@ class Config 'version' => config('pixelfed.version'), 'open_registration' => (bool) config_cache('pixelfed.open_registration'), 'uploader' => [ - 'max_photo_size' => (int) config('pixelfed.max_photo_size'), + 'max_photo_size' => (int) config_cache('pixelfed.max_photo_size'), 'max_caption_length' => (int) config_cache('pixelfed.max_caption_length'), 'max_altext_length' => (int) config_cache('pixelfed.max_altext_length', 150), 'album_limit' => (int) config_cache('pixelfed.max_album_length'),