mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:49:14 +08:00
Revert "FIX: Regularly reset unknown extension of uploads"
This reverts commit cc7b24b88b
as it shouldn't be needed anymore for new uploads.
This commit is contained in:
parent
fe83baa9b3
commit
957e851ffe
|
@ -12,7 +12,6 @@ module Jobs
|
|||
MiniScheduler::Stat.purge_old
|
||||
Draft.cleanup!
|
||||
UserAuthToken.cleanup!
|
||||
Upload.reset_unknown_extensions!
|
||||
Email::Cleaner.delete_rejected!
|
||||
Notification.purge_old!
|
||||
end
|
||||
|
|
|
@ -401,10 +401,6 @@ class Upload < ActiveRecord::Base
|
|||
problems
|
||||
end
|
||||
|
||||
def self.reset_unknown_extensions!
|
||||
Upload.where(extension: "unknown").update_all(extension: nil)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def short_url_basename
|
||||
|
|
|
@ -399,18 +399,6 @@ describe Upload do
|
|||
end
|
||||
end
|
||||
|
||||
describe '.reset_unknown_extensions!' do
|
||||
it 'should reset the extension of uploads when it is "unknown"' do
|
||||
upload1 = Fabricate(:upload, extension: "unknown")
|
||||
upload2 = Fabricate(:upload, extension: "png")
|
||||
|
||||
Upload.reset_unknown_extensions!
|
||||
|
||||
expect(upload1.reload.extension).to eq(nil)
|
||||
expect(upload2.reload.extension).to eq("png")
|
||||
end
|
||||
end
|
||||
|
||||
def enable_secure_media
|
||||
SiteSetting.enable_s3_uploads = true
|
||||
SiteSetting.s3_upload_bucket = "s3-upload-bucket"
|
||||
|
|
Loading…
Reference in New Issue
Block a user