mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 19:01:37 +01:00
Create special case to prefer "jpeg" over "jpe" file extension (#7841)
This commit is contained in:
parent
7e9e7c642d
commit
50689f0d41
1 changed files with 3 additions and 1 deletions
|
@ -41,7 +41,9 @@ module Attachmentable
|
|||
|
||||
extensions_for_mime_type = mime_type.empty? ? [] : mime_type.first.extensions
|
||||
original_extension = Paperclip::Interpolations.extension(attachment, :original)
|
||||
proper_extension = extensions_for_mime_type.first.to_s
|
||||
proper_extension = 'jpeg' if proper_extension == 'jpe'
|
||||
|
||||
extensions_for_mime_type.include?(original_extension) ? original_extension : extensions_for_mime_type.first
|
||||
extensions_for_mime_type.include?(original_extension) ? original_extension : proper_extension
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue