FIX: Regularly reset unknown extension of uploads

Discourse will try to detect the extension the next time the upload is needed. Maybe there was just a transient error the last time.
This commit is contained in:
Gerhard Schlager
2019-08-21 10:23:20 +02:00
parent 719a93c312
commit cc7b24b88b
3 changed files with 16 additions and 0 deletions

View File

@ -359,6 +359,10 @@ 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