@seafile/sdoc-editor 1.0.206-test0.2.1 → 1.0.206-test0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -65,11 +65,12 @@ const SelectSdocFileDialog = _ref => {
|
|
|
65
65
|
break;
|
|
66
66
|
case _constants.ELEMENT_TYPE.VIDEO:
|
|
67
67
|
const {
|
|
68
|
-
server,
|
|
69
68
|
repoID
|
|
70
69
|
} = window.app.pageOptions;
|
|
71
|
-
const
|
|
72
|
-
|
|
70
|
+
const {
|
|
71
|
+
fileServerRoot
|
|
72
|
+
} = window.app.config.siteRoot;
|
|
73
|
+
const url = `${fileServerRoot}repos/${repoID}/files${fileInfo.path}/?op=download`;
|
|
73
74
|
const encodedUrl = encodeURI(url);
|
|
74
75
|
console.log(5, url, encodedUrl);
|
|
75
76
|
insertVideo && insertVideo(editor, {
|
|
@@ -94,12 +95,6 @@ const SelectSdocFileDialog = _ref => {
|
|
|
94
95
|
// Insert video element in sdoc
|
|
95
96
|
if (dialogType === _constants.ELEMENT_TYPE.VIDEO) {
|
|
96
97
|
console.log(0);
|
|
97
|
-
_context.default.getSeafileVideo(fileInfo.name).then(res => {
|
|
98
|
-
console.log(2, res);
|
|
99
|
-
if (res.status === 200) {
|
|
100
|
-
console.log(5, res);
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
98
|
console.log(1, fileInfo);
|
|
104
99
|
insertFile(fileInfo);
|
|
105
100
|
closeDialog();
|