set timeout between multi download cycles

This commit is contained in:
Milos Holba
2020-12-05 18:17:45 +01:00
parent 5d512f7806
commit 1b3baab691
3 changed files with 19 additions and 13 deletions

View File

@@ -460,11 +460,13 @@ export default {
}
//Download all selected items
if(this.fileInfoDetail.includes(this.item)) {
this.fileInfoDetail.forEach(item => {
this.$downloadFile(
item.file_url,
item.name + '.' + item.mimetype
)
this.fileInfoDetail.forEach((item , i) => {
setTimeout(() => {
this.$downloadFile(
item.file_url,
item.name + '.' + item.mimetype
)
}, i * 100);
})
}
},

View File

@@ -33,11 +33,13 @@ export default {
events.$emit('mobileSelecting-stop')
},
downloadItem() {
this.fileInfoDetail.forEach(item => {
this.$downloadFile(
item.file_url,
item.name + '.' + item.mimetype
)
this.fileInfoDetail.forEach((item , i) => {
setTimeout(() => {
this.$downloadFile(
item.file_url,
item.name + '.' + item.mimetype
)
}, i * 100);
})
},
moveItem() {