Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix mimetype returning nil (mastodon#14356)
Browse files Browse the repository at this point in the history
  • Loading branch information
noellabo authored Jul 19, 2020
1 parent a290802 commit 101485a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/paperclip/media_type_spoof_detector_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def type_from_mime_magic
@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
''
Expand Down

0 comments on commit 101485a

Please sign in to comment.