Skip to content

UploadTask Example 3 broken #7859

Open
Open
@marcusx2

Description

@marcusx2

Operating System

macOS

Browser Version

Safari 16.5.2

Firebase SDK Version

10.7.0

Firebase SDK Product:

Storage

Describe your project's tooling

index.html with source tag. Just javascript.

Describe the problem

Example 3 is partly broken.

Steps and code to reproduce issue

This snippet is broken

var handle = uploadTask.on('state_changed');//changed from firebase.storage.TaskEvent.STATE_CHANGED
unsubscribe = handle(function(snapshot) {
  var percent = snapshot.bytesTransferred / snapshot.totalBytes * 100;
  console.log(percent + "% done");
  // Stop after receiving one update.
  unsubscribe();
});

It does not work. I get the error undefined is not an object (evaluating 't.next'). It seems that the on method can only return Unsubscribe.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions