Skip to content

Commit 4f45bd4

Browse files
Add logging about Terrapin exception (#108)
1 parent f606ef5 commit 4f45bd4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/paperclip/media_type_spoof_detector.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def type_from_file_command
7676
Paperclip.run("file", "-b --mime :file", file: @file.path).
7777
split(/[:;\s]+/).first
7878
rescue Terrapin::CommandLineError
79+
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.")
80+
7981
""
8082
end
8183

0 commit comments

Comments
 (0)