DEV: Fix uploads:fix_missing_s3 rake task when file is too big ()

If the upload has existed before, we should allow the upload to be
created even if the upload's size is too big.
This commit is contained in:
Alan Guo Xiang Tan 2024-11-13 15:01:44 +08:00 committed by GitHub
parent 352777a074
commit 69b552a211
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1122,6 +1122,7 @@ def fix_missing_s3
tempfile, tempfile,
"temp.#{upload.extension}", "temp.#{upload.extension}",
skip_validations: true, skip_validations: true,
external_upload_too_big: true,
).create_for(Discourse.system_user.id) ).create_for(Discourse.system_user.id)
rescue => fix_error rescue => fix_error
# invalid extension is the most common issue # invalid extension is the most common issue