1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 18:30:53 +00:00

repair code bug

This commit is contained in:
shanshuirenjia
2022-01-05 16:36:40 +08:00
parent 7ab606698c
commit 712d4fbb90

View File

@@ -734,9 +734,8 @@ class MarkdownEditor extends React.Component {
const fileName = Utils.getFileName(filePath);
const suffix = fileName.slice(fileName.indexOf('.') + 1);
if (IMAGE_SUFFIXES.includes(suffix)) {
seafileAPI.getFileDownloadLink(repoID, filePath).then((res) => {
window.richMarkdownEditor.addLink(fileName, res.data, true);
});
let innerURL = serviceUrl + '/lib/' + repoID + '/file' + Utils.encodePath(filePath) + '?raw=1';
window.richMarkdownEditor.addLink(fileName, innerURL, true);
return;
}
let innerURL = serviceUrl + '/lib/' + repoID + '/file' + Utils.encodePath(filePath);