mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-09 10:50:24 +00:00
repair code bug
This commit is contained in:
@@ -734,9 +734,8 @@ class MarkdownEditor extends React.Component {
|
|||||||
const fileName = Utils.getFileName(filePath);
|
const fileName = Utils.getFileName(filePath);
|
||||||
const suffix = fileName.slice(fileName.indexOf('.') + 1);
|
const suffix = fileName.slice(fileName.indexOf('.') + 1);
|
||||||
if (IMAGE_SUFFIXES.includes(suffix)) {
|
if (IMAGE_SUFFIXES.includes(suffix)) {
|
||||||
seafileAPI.getFileDownloadLink(repoID, filePath).then((res) => {
|
let innerURL = serviceUrl + '/lib/' + repoID + '/file' + Utils.encodePath(filePath) + '?raw=1';
|
||||||
window.richMarkdownEditor.addLink(fileName, res.data, true);
|
window.richMarkdownEditor.addLink(fileName, innerURL, true);
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let innerURL = serviceUrl + '/lib/' + repoID + '/file' + Utils.encodePath(filePath);
|
let innerURL = serviceUrl + '/lib/' + repoID + '/file' + Utils.encodePath(filePath);
|
||||||
|
Reference in New Issue
Block a user