1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 03:11:07 +00:00

add pdf thumbnail (#6157)

Co-authored-by: 孙永强 <11704063+s-yongqiang@user.noreply.gitee.com>
This commit is contained in:
awu0403
2024-06-04 16:06:57 +08:00
committed by GitHub
parent 0b84b22df9
commit ca83ef90dc
16 changed files with 83 additions and 11 deletions

View File

@@ -124,6 +124,19 @@ export const Utils = {
}
},
pdfCheck: function(filename) {
if (filename.lastIndexOf('.') == -1) {
return false;
}
var file_ext = filename.substr(filename.lastIndexOf('.') + 1).toLowerCase();
var image_exts = ['pdf'];
if (image_exts.indexOf(file_ext) != -1) {
return true;
} else {
return false;
}
},
getShareLinkPermissionList: function(itemType, permission, path, canEdit) {
// itemType: library, dir, file
// permission: rw, r, admin, cloud-edit, preview, custom-*