mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: Upload's content is the only source of truth for the file type.
This commit is contained in:
@ -107,14 +107,12 @@ class UploadsController < ApplicationController
|
||||
else
|
||||
tempfile = file.tempfile
|
||||
filename = file.original_filename
|
||||
content_type = file.content_type
|
||||
end
|
||||
|
||||
return { errors: [I18n.t("upload.file_missing")] } if tempfile.nil?
|
||||
|
||||
opts = {
|
||||
type: type,
|
||||
content_type: content_type,
|
||||
for_private_message: for_private_message,
|
||||
pasted: pasted,
|
||||
}
|
||||
|
Reference in New Issue
Block a user