use thumbnail in blobinfo

Change-Id: I48722b88ec4f2c80b689034df1c0e3fd5132b36c
This commit is contained in:
mpl 2011-06-17 07:30:46 -07:00 committed by Brad Fitzpatrick
parent 0d7581ede6
commit 9f32c111e5
1 changed files with 7 additions and 2 deletions

View File

@ -47,8 +47,13 @@ function blobInfoUpdate(bmap) {
bd.innerHTML = "<a href=''></a>";
var fileName = finfo.fileName || blobref;
bd.firstChild.href = "./download/" + blobref + "/" + fileName;
bd.firstChild.innerText = fileName;
bd.innerHTML = "[download: " + bd.innerHTML + "]";
if (binfo.file.mimeType.indexOf("image/") == 0) {
img = "<img src='./thumbnail/" + blobref + "/" + fileName + "?mw=100&mh=100'/>";
bd.firstChild.innerHTML = img;
} else {
bd.firstChild.innerText = fileName;
bd.innerHTML = "[download: " + bd.innerHTML + "]";
}
} catch (x) {
}
}