Thumbnail file extension fix

Fix thumbnail images sometimes using `.jpeg` file extension, resulting in 404.
This commit is contained in:
Mark Taiwan 2015-01-28 23:29:15 +08:00
parent dc1cd65e11
commit 0f1461f7e5

View File

@ -212,7 +212,7 @@ onready(function(){
if (this.isImage && !this.isSpoiler) { if (this.isImage && !this.isSpoiler) {
// video files uses jpg for thumbnail // video files uses jpg for thumbnail
if (this.ext === '.webm' || this.ext === '.mp4') this.ext = '.jpg'; if (this.ext === '.webm' || this.ext === '.mp4' || this.ext === '.jpeg') this.ext = '.jpg';
thumb_url = '/'+ board +'/thumb/' + this.tim + this.ext; thumb_url = '/'+ board +'/thumb/' + this.tim + this.ext;
} else { } else {
thumb_url = (this.isSpoiler) ? '/static/spoiler.png' : '/static/file.png'; thumb_url = (this.isSpoiler) ? '/static/spoiler.png' : '/static/file.png';