mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Fix mimetype returning nil (#14356)
This commit is contained in:
parent
a29080256e
commit
101485a41f
@ -18,7 +18,7 @@ module Paperclip
|
||||
@type_from_mime_magic ||= begin
|
||||
begin
|
||||
File.open(@file.path) do |file|
|
||||
MimeMagic.by_magic(file)&.type
|
||||
MimeMagic.by_magic(file)&.type || ''
|
||||
end
|
||||
rescue Errno::ENOENT
|
||||
''
|
||||
|
Loading…
Reference in New Issue
Block a user