mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 10:58:33 +00:00
update-addfile
This commit is contained in:
@@ -140,9 +140,12 @@ class ExternalOperations extends React.Component {
|
|||||||
return isDuplicated;
|
return isDuplicated;
|
||||||
};
|
};
|
||||||
|
|
||||||
onAddFile = (filePath, isMarkdownDraft, isSdocDraft) => {
|
onAddFile = (filePath, isMarkdownDraft) => {
|
||||||
let repoID = this.props.repoID;
|
let repoID = this.props.repoID;
|
||||||
seafileAPI.createFile(repoID, filePath, isMarkdownDraft).catch((error) => {
|
seafileAPI.createFile(repoID, filePath, isMarkdownDraft).then((res) => {
|
||||||
|
const eventBus = EventBus.getInstance();
|
||||||
|
eventBus.dispatch(EXTERNAL_EVENT.INSERT_LINK, {data: res.data});
|
||||||
|
}).catch((error) => {
|
||||||
let errMessage = Utils.getErrorMsg(error);
|
let errMessage = Utils.getErrorMsg(error);
|
||||||
toaster.danger(errMessage);
|
toaster.danger(errMessage);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user