mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-11 20:01:10 +00:00
feat(md): add docx and pdf file type summary sup (#6694)
This commit is contained in:
@@ -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) {
|
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) {
|
isFileMetadata: function (type) {
|
||||||
|
Reference in New Issue
Block a user