mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 07:23:43 +01:00
Fix mimetype returning nil (#14356)
This commit is contained in:
parent
a29080256e
commit
101485a41f
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ module Paperclip
|
||||||
@type_from_mime_magic ||= begin
|
@type_from_mime_magic ||= begin
|
||||||
begin
|
begin
|
||||||
File.open(@file.path) do |file|
|
File.open(@file.path) do |file|
|
||||||
MimeMagic.by_magic(file)&.type
|
MimeMagic.by_magic(file)&.type || ''
|
||||||
end
|
end
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in a new issue