Skip to content
Advertisement

firebase storage execute code after multiple file upload

I’m trying to redirect to another page after all the file are done uploading to firebase storage. It keep executing the redirect code before finishing the uploads. Can’t figure out how to execute one after the other. This is a js scripts running on client side of the website.

JavaScript

Advertisement

Answer

Returned a promise from the uploadFile and storeDetail functions then made the submit function async and await for uploadFile function call, for complete.

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement