1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 02:42:47 +00:00

feat(md): add docx and pdf file type summary sup (#6694)

This commit is contained in:
cir9no
2024-09-10 11:00:53 +08:00
committed by GitHub
parent 2fa2e0e1db
commit 9d917d8599

View File

@@ -891,8 +891,22 @@ export const Utils = {
}
},
isDocxFile: function (filePath) {
let index = filePath.lastIndexOf('.');
if (index === -1) {
return false;
} else {
let type = filePath.substring(index).toLowerCase();
if (type === '.docx') {
return true;
} else {
return false;
}
}
},
isSummarySupportedFile: function (filePath) {
return Utils.isSdocFile(filePath) || Utils.isMarkdownFile(filePath);
return Utils.isSdocFile(filePath) || Utils.isMarkdownFile(filePath) || Utils.pdfCheck(filePath) || Utils.isDocxFile(filePath);
},
isFileMetadata: function (type) {