Skip to content

Upload monitoring progress #16

@fengmk2

Description

@fengmk2

Is there a way to listen the upload progress event just like AJAX does?

Example in Using_XMLHttpRequest

var req = new XMLHttpRequest();
req.addEventListener("progress", updateProgress, false);
// progress on transfers from the server to the client (downloads)
function updateProgress(evt) {
  if (evt.lengthComputable) {
    var percentComplete = evt.loaded / evt.total;
    ...
  } else {
    // Unable to compute progress information since the total size is unknown
  }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions