Explorar o código

Update config_cache

Daniel Supernault hai 1 ano
pai
achega
c96167f2f7

+ 2 - 2
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,

+ 1 - 1
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')
             ]
         ]);
 

+ 1 - 1
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'),