# DownloadTask.onProgressUpdate(function callback)
Start from base library version 1.4.0. Please remaining backward compatible.
with Promise style call: Not supported
Mini Program plugin: Support
Listen for changes in download progress
# parameter
# function callback
Download callback functions for progress change events
# parameter
# Object res
attribute | type | Introductions |
---|---|---|
progress | number | Download progress percentage |
totalBytesWritten | number | Length of data downloaded in units Bytes |
totalBytesExpectedToWrite | number | Total length of data expected to be downloaded, in units Bytes |