Skip to content

Instantly share code, notes, and snippets.

@muhozi
Created June 17, 2019 15:20
Show Gist options
  • Save muhozi/5a522f9adddb9062a5a01b6e689e886c to your computer and use it in GitHub Desktop.
Save muhozi/5a522f9adddb9062a5a01b6e689e886c to your computer and use it in GitHub Desktop.
upload sample
firebase.storage.TaskEvent.STATE_CHANGED,
snapshot => {
let state = {};
state = {
...state,
progress: (snapshot.bytesTransferred / snapshot.totalBytes) * 100 // Calculate progress percentage
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment