mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
Add onUploadProgress and onDownloadProgress are browser only (#2763)
Saw in #928 and #1966 that `onUploadProgress` and `onDownloadProgress` only work in the browser and was missing that from the README. Co-authored-by: Xianming Zhong <chinesedfan@qq.com>
This commit is contained in:
@@ -347,11 +347,13 @@ These are the available config options for making requests. Only the `url` is re
|
|||||||
xsrfHeaderName: 'X-XSRF-TOKEN', // default
|
xsrfHeaderName: 'X-XSRF-TOKEN', // default
|
||||||
|
|
||||||
// `onUploadProgress` allows handling of progress events for uploads
|
// `onUploadProgress` allows handling of progress events for uploads
|
||||||
|
// browser only
|
||||||
onUploadProgress: function (progressEvent) {
|
onUploadProgress: function (progressEvent) {
|
||||||
// Do whatever you want with the native progress event
|
// Do whatever you want with the native progress event
|
||||||
},
|
},
|
||||||
|
|
||||||
// `onDownloadProgress` allows handling of progress events for downloads
|
// `onDownloadProgress` allows handling of progress events for downloads
|
||||||
|
// browser only
|
||||||
onDownloadProgress: function (progressEvent) {
|
onDownloadProgress: function (progressEvent) {
|
||||||
// Do whatever you want with the native progress event
|
// Do whatever you want with the native progress event
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user