fix: drag-drop / copy-paste should work for multiple files (#11214)

Co-authored-by: Gabriel Horner <97210743+logseq-cldwalker@users.noreply.github.com>
This commit is contained in:
Ayush Agrawal
2024-10-19 02:43:10 +05:30
committed by GitHub
parent 226db2024f
commit 53d8c5a3c6
3 changed files with 11 additions and 9 deletions

View File

@@ -219,10 +219,11 @@
(when id
(let [clipboard-data (gobj/get e "clipboardData")
files (.-files clipboard-data)]
(when-let [file (first files)]
(when-let [block (state/get-edit-block)]
(editor-handler/upload-asset id #js[file] (:block/format block)
editor-handler/*asset-uploading? true)))
(loop [files files]
(when-let [file (first files)]
(when-let [block (state/get-edit-block)]
(editor-handler/upload-asset id #js[file] (:block/format block) editor-handler/*asset-uploading? true))
(recur (rest files))))
(util/stop e))))
(defn editor-on-paste!