diff --git a/docs/request.md b/docs/request.md index 3277c378..fe962e50 100644 --- a/docs/request.md +++ b/docs/request.md @@ -329,7 +329,7 @@ function upload(e) { url: "/api/v1/upload", data: data, config: function(xhr) { - xhr.addEventListener("progress", function(e) { + xhr.upload.addEventListener("progress", function(e) { progress = e.loaded / e.total m.redraw() // tell Mithril that data changed and a re-render is needed