Revert "FIX: Regularly reset unknown extension of uploads"

Revert “FIX: Regularly reset unknown extension of uploads”

This reverts commit cc7b24b88bac0fdd7d84ba7f50932b757538d0f7 as it shouldn’t be needed anymore for new uploads.

diff --git a/app/jobs/scheduled/weekly.rb b/app/jobs/scheduled/weekly.rb
index f149684..c71ac70 100644
--- a/app/jobs/scheduled/weekly.rb
+++ b/app/jobs/scheduled/weekly.rb
@@ -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
diff --git a/app/models/upload.rb b/app/models/upload.rb
index 25b589c..559ad0c 100644
--- a/app/models/upload.rb
+++ b/app/models/upload.rb
@@ -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
diff --git a/spec/models/upload_spec.rb b/spec/models/upload_spec.rb
index 680d017..e95aa43 100644
--- a/spec/models/upload_spec.rb
+++ b/spec/models/upload_spec.rb
@@ -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"

GitHub sha: 957e851f