there is a limit of downloads that can be done at the same time and that limit is 10 how can I change the code so that it allows more than 10 at the same time ?
JavaScript
x
16
16
1
transferFiles(){
2
this.checkMark = true
3
4
let i = 0
5
this.finalImages.forEach((image) =>{
6
i++
7
saveAs(image, 'imagem'+i);
8
9
})
10
11
}
12
13
14
}
15
}
16
Advertisement
Answer
I’m not sure what you are trying to do, but if there is a restriction on the number of simultaneous downloads, why not try setting a timeout so they don’t fire at the same time?
JavaScript
1
11
11
1
transferFiles(){
2
this.checkMark = true
3
4
let i = 0
5
this.finalImages.forEach((image) =>{
6
setTimeout(function(){
7
saveAs(image, 'imagem'+(i+1));
8
}, i++ * 500);
9
});
10
}
11