mirror of
https://github.com/discourse/discourse.git
synced 2025-03-26 06:35:51 +08:00
FIX: use 'jpg' instead of 'jpe' extension for 'image/jpeg' content type
This commit is contained in:
parent
e50bd38013
commit
ca539854c8
@ -31,6 +31,7 @@ class FileHelper
|
|||||||
|
|
||||||
if extension.blank? && downloaded.content_type.present?
|
if extension.blank? && downloaded.content_type.present?
|
||||||
ext = MiniMime.lookup_by_content_type(downloaded.content_type)&.extension
|
ext = MiniMime.lookup_by_content_type(downloaded.content_type)&.extension
|
||||||
|
ext = "jpg" if ext == "jpe"
|
||||||
extension = "." + ext if ext.present?
|
extension = "." + ext if ext.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user