showing results for - "firebase javascript up 3boad multiple files"
Elías
29 May 2019
1putStorageItem(item) {
2  // the return value will be a Promise
3  return firebase.storage().ref("YourPath").put("YourFile")
4  .then((snapshot) => {
5    console.log('One success:', item)
6  }).catch((error) => {
7    console.log('One failed:', item, error.message)
8  });
9}
10
Mattia
08 Jan 2019
1Promise.all(
2  // Array of "Promises"
3  myItems.map(item => putStorageItem(item))
4)
5.then((url) => {
6  console.log(`All success`)
7})
8.catch((error) => {
9  console.log(`Some failed: `, error.message)
10});
11
similar questions