Broadened the check for mime type in the url to allow query strings

This commit is contained in:
Grant Echols 2016-01-14 11:00:25 -07:00
parent 5390cb96c7
commit 7c4ef5c1e9

View File

@ -215,9 +215,9 @@ function filterFiles( files ){
if( file.height && if( file.height &&
file.width && file.width &&
file.url && ( file.url && (
file.url.toLowerCase().match(/^.*\.(png|jpg|jpeg|gif)$/) || ( file.url.toLowerCase().match(/^.*\.(png|jpg|jpeg|gif)(?:\?.*)?$/) || (
file.mimetype && file.mimetype &&
file.mimetype.toLowerCase().match(/^.*\/(png|jpg|jpeg|gif)$/) file.mimetype.toLowerCase().match(/^.*\.(png|jpg|jpeg|gif)(?:\?.*)?$/)
) )
) ){ ) ){
//This is sufficient to serve as a level //This is sufficient to serve as a level