feat: add getUploadProgress API to the net API (#13783)
This commit is contained in:
parent
c8dc2d3730
commit
4b3011f3e8
6 changed files with 45 additions and 0 deletions
|
@ -215,3 +215,17 @@ response object,it will emit the `aborted` event.
|
|||
#### `request.followRedirect()`
|
||||
|
||||
Continues any deferred redirection request when the redirection mode is `manual`.
|
||||
|
||||
#### `request.getUploadProgress()`
|
||||
|
||||
Returns `Object`:
|
||||
|
||||
* `active` Boolean - Whether the request is currently active. If this is false
|
||||
no other properties will be set
|
||||
* `started` Boolean - Whether the upload has started. If this is false both
|
||||
`current` and `total` will be set to 0.
|
||||
* `current` Integer - The number of bytes that have been uploaded so far
|
||||
* `total` Integer - The number of bytes that will be uploaded this request
|
||||
|
||||
You can use this method in conjunction with `POST` requests to get the progress
|
||||
of a file upload or other data transfer.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue