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:
@@ -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
|
||||
|
Reference in New Issue
Block a user