mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 10:41:25 +08:00
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:
@ -86,7 +86,7 @@ RSpec.describe ShrinkUploadedImage do
|
||||
it "returns false when the upload is above the size limit" do
|
||||
post = Fabricate(:post, raw: "<img src='#{upload.url}'>")
|
||||
post.link_post_uploads
|
||||
SiteSetting.max_image_size_kb = 0.001 # 1 byte
|
||||
SiteSetting.max_image_size_kb = 0
|
||||
|
||||
result =
|
||||
ShrinkUploadedImage.new(
|
||||
|
Reference in New Issue
Block a user