DEV: Add file_size_restriction site setting type (#24704)

This change will allow admins to configure file sizes in mb instead of
having to convert to kb.

Co-authored-by: Ella <ella.estigoy@gmail.com>
This commit is contained in:
Blake Erickson
2023-12-13 16:22:48 -07:00
committed by GitHub
parent 89826ef56d
commit 00209f03e6
15 changed files with 382 additions and 31 deletions

View File

@ -34,6 +34,8 @@ class Admin::SiteSettingsController < Admin::AdminController
case SiteSetting.type_supervisor.get_type(id)
when :integer
value = value.tr("^-0-9", "")
when :file_size_restriction
value = value.tr("^-0-9", "")
when :uploaded_image_list
value = Upload.get_from_urls(value.split("|")).to_a
end