MediaUpload: Allow drag-and-drop of multiple files at once
This commit is contained in:
parent
acbef1ebdc
commit
e6a27bcaca
1 changed files with 3 additions and 1 deletions
|
@ -37,7 +37,9 @@ const mediaUpload = {
|
||||||
fileDrop (e) {
|
fileDrop (e) {
|
||||||
if (e.dataTransfer.files.length > 0) {
|
if (e.dataTransfer.files.length > 0) {
|
||||||
e.preventDefault() // allow dropping text like before
|
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) {
|
fileDrag (e) {
|
||||||
|
|
Loading…
Reference in a new issue