Skip to content

Commit

Permalink
Add logging about Terrapin exception (kreeti#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumebriday-pa authored May 9, 2023
1 parent f606ef5 commit 4f45bd4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/paperclip/media_type_spoof_detector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def type_from_file_command
Paperclip.run("file", "-b --mime :file", file: @file.path).
split(/[:;\s]+/).first
rescue Terrapin::CommandLineError
Paperclip.log("Problem getting type from `file` command. Possible that `file` doesn't exist on this system. Content Type validations don't work without this.")

""
end

Expand Down

0 comments on commit 4f45bd4

Please sign in to comment.