Marius
Marius

Reputation: 13

Firebase file upload progress jumps from 0 to 100

I'm using the Firebase Storage to upload files.

https://firebase.google.com/docs/storage/web/upload-files#monitor_upload_progress

The upload works well, but the on("state_changed") event is called only twice, so my progress bar jumps from 0% to 100%. Is it possible to get some values between 0 and 100? This would be a better experience for the user.

Upvotes: 1

Views: 2864

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 598708

The number of time the state_changed event is raised, depends on the size of the file you upload: if fires for each block of 256KB. So if the file is <256KB this is expected behavior.

Upvotes: 5

Related Questions