Additional fixes for bug 386333

This commit is contained in:
Dão Gottwald 2009-09-19 12:19:48 +02:00
parent 20394f5a36
commit 792e203b04

View File

@ -875,15 +875,15 @@ function makePreview(row)
// if we have a data url, get the MIME type from the url
if (!mimeType && /^data:/.test(url)) {
var dataMimeType = /^data:(image\/.*);/.exec(url);
let dataMimeType = /^data:(image\/[^;,]+)/i.exec(url);
if (dataMimeType)
mimeType = dataMimeType[1];
mimeType = dataMimeType[1].toLowerCase();
}
var imageType;
if (mimeType) {
// We found the type, try to display it nicely
var imageMimeType = /^image\/(.*)/.exec(mimeType);
let imageMimeType = /^image\/(.*)/i.exec(mimeType);
if (imageMimeType) {
imageType = imageMimeType[1].toUpperCase();
if (numFrames > 1)