Skip to content

Commit

Permalink
Update config_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Mar 11, 2024
1 parent bf46f6f commit c96167f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/Api/ApiV1Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -1650,11 +1650,11 @@ public function instance(Request $request)
'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,
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/ImportPostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function storeMedia(Request $request)
'required',
'file',
$mimes,
'max:' . config('pixelfed.max_photo_size')
'max:' . config_cache('pixelfed.max_photo_size')
]
]);

Expand Down
2 changes: 1 addition & 1 deletion app/Util/Site/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static function get()
'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'),
Expand Down

0 comments on commit c96167f

Please sign in to comment.