From e6a27bcaca57c4c6351f7c41c2892c4e5222829e Mon Sep 17 00:00:00 2001 From: lain Date: Mon, 8 Jun 2020 13:30:16 +0200 Subject: [PATCH] MediaUpload: Allow drag-and-drop of multiple files at once --- src/components/media_upload/media_upload.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/media_upload/media_upload.js b/src/components/media_upload/media_upload.js index f457d0220b..4568224ba8 100644 --- a/src/components/media_upload/media_upload.js +++ b/src/components/media_upload/media_upload.js @@ -37,7 +37,9 @@ const mediaUpload = { fileDrop (e) { if (e.dataTransfer.files.length > 0) { e.preventDefault() // allow dropping text like before - this.uploadFile(e.dataTransfer.files[0]) + for (const file of e.dataTransfer.files) { + this.uploadFile(file) + } } }, fileDrag (e) {