Added preview images for non-image files

Этот коммит содержится в:
hmhealey
2015-07-24 17:04:02 -04:00
родитель f502fdef50
Коммит b8a69f767c
2 изменённых файлов: 42 добавлений и 18 удалений

Просмотреть файл

@@ -533,6 +533,19 @@ module.exports.getFileType = function(ext) {
return "other";
};
module.exports.getPreviewImagePathForFileType = function(fileType) {
fileType = fileType.toLowerCase();
var icon;
if (fileType in Constants.ICON_FROM_TYPE) {
icon = Constants.ICON_FROM_TYPE[fileType];
} else {
icon = Constants.ICON_FROM_TYPE["other"];
}
return "/static/images/icons/" + icon + ".png";
};
module.exports.getIconClassName = function(fileType) {
fileType = fileType.toLowerCase();