This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Fix mimetype returning nil (
#14356
)
master
Takeshi Umeda
4 years ago
committed by
GitHub
parent
a29080256e
commit
101485a41f
No known key found for this signature in database
GPG Key ID:
4AEE18F83AFDEB23
1 changed files
with
1 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
lib/paperclip/media_type_spoof_detector_extensions.rb
+ 1
- 1
lib/paperclip/media_type_spoof_detector_extensions.rb
View File
@ -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
''
Write
Preview
Loading…
Cancel
Save