1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-26 15:26:19 +00:00

add office file editOnCloud and download (#3716)

* add office file editOnCloud and download

* modify some details
This commit is contained in:
Leo
2019-06-26 17:21:29 +08:00
committed by lian
parent 163b7f1cfd
commit 7b7055bd19
3 changed files with 41 additions and 4 deletions

View File

@@ -104,6 +104,20 @@ export const Utils = {
}
},
isOfficeFile: function(filename) {
// no file ext
if (filename.lastIndexOf('.') == -1) {
return false;
}
var file_ext = filename.substr(filename.lastIndexOf('.') + 1).toLowerCase();
var exts = ['doc', 'ppt', 'xls', 'docx', 'pptx', 'xlsx'];
if (exts.indexOf(file_ext) != -1) {
return true;
} else {
return false;
}
},
// check if a file is a video
videoCheck: function (filename) {
// no file ext