mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 05:26:02 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user