fix: file not linking to note when uploaded by dragging on note

This commit is contained in:
Aman Harwara
2022-10-20 12:44:50 +05:30
parent e99c7b7c51
commit d333d4f188
2 changed files with 8 additions and 8 deletions

View File

@@ -18,9 +18,9 @@ const NoteViewFileDropTarget = ({ note, linkingController, noteViewElement }: Pr
if (target) {
addDragTarget(target, {
tooltipText: 'Drop your files to upload and link them to the current note',
callback(files) {
callback: (files) => {
files.forEach(async (uploadedFile) => {
await linkingController.linkItems(uploadedFile, note)
await linkingController.linkItems(note, uploadedFile)
})
},
})