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:
Gerhard Schlager 2020-08-03 13:37:32 +02:00
parent fe83baa9b3
commit 957e851ffe
3 changed files with 0 additions and 17 deletions

View File

@ -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

View File

@ -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

View File

@ -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"