mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-23 23:44:06 +01:00
🚨
This commit is contained in:
parent
98692c85df
commit
22a4fd9285
9 changed files with 26 additions and 27 deletions
|
|
@ -334,24 +334,24 @@ export const dragUpload = (files: string[], protyle: IProtyle, cellElement: HTML
|
|||
id: protyle.block.rootID
|
||||
}, (response) => {
|
||||
hideMessage(msgId);
|
||||
const addUpdateValue: IAVCellAssetValue[] = []
|
||||
const addUpdateValue: IAVCellAssetValue[] = [];
|
||||
Object.keys(response.data.succMap).forEach(key => {
|
||||
const type = pathPosix().extname(key).toLowerCase();
|
||||
const name = key.substring(0, key.length - type.length)
|
||||
const name = key.substring(0, key.length - type.length);
|
||||
if (Constants.SIYUAN_ASSETS_IMAGE.includes(type)) {
|
||||
addUpdateValue.push({
|
||||
type: "image",
|
||||
name,
|
||||
content: response.data.succMap[key],
|
||||
})
|
||||
});
|
||||
} else {
|
||||
addUpdateValue.push({
|
||||
type: "file",
|
||||
name,
|
||||
content: response.data.succMap[key],
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
fetchPost("/api/av/renderAttributeView", {
|
||||
id: avID,
|
||||
}, (response) => {
|
||||
|
|
@ -362,6 +362,6 @@ export const dragUpload = (files: string[], protyle: IProtyle, cellElement: HTML
|
|||
type: "addUpdate",
|
||||
addUpdateValue
|
||||
});
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue