MIME type extension check added
Merge remote-tracking branch 'upstream/master'