Recognize files with .jpeg extension as images.

This commit is contained in:
ccd0 2018-01-24 12:50:12 -08:00
parent 1ea6f14384
commit 54722f38d8

View File

@ -173,7 +173,7 @@ class Post
$.extend file,
url: file.link.href
isImage: /(jpg|png|gif)$/i.test file.link.href
isImage: /(jpe?g|png|gif)$/i.test file.link.href
isVideo: /(webm|mp4)$/i.test file.link.href
size = +file.size.match(/[\d.]+/)[0]
unit = ['B', 'KB', 'MB', 'GB'].indexOf file.size.match(/\w+$/)[0]