I'm trying to upload files one by one (sequentially). Start method returning promise and I use it to upload file. Code works but I have problem with firefox (http/2) and I need to upload file after promise from previous is resolved. Does anyone know how to do this with $q?
var files = [
//example obj
{
id: '123123',
start: function () {
// uploading file, returning promise
}
}
];
files.forEach(function (file) {
file.start().then(function (id) {
//refresh file
})
})