MediaUpload: Allow drag-and-drop of multiple files at once

This commit is contained in:
lain 2020-06-08 13:30:16 +02:00
parent acbef1ebdc
commit e6a27bcaca

View File

@ -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) {