Answers for "when is onUploadProgressCalled axios"

1

fileupload progress bar in axios

const config = {
    onUploadProgress: progressEvent => console.log(progressEvent.loaded)
}
Posted by: Guest on August-04-2020
0

when is onUploadProgressCalled axios

let response = await axios({
  method: 'post',
  url: imageUploadUrl,
  data: {
    connectorId,
    data
  },
  onUploadProgress: (progressEvent) => {
    const { loaded, total } = progressEvent;
    dispatch(updateImageUploadProgress(loaded, total));
  },
  cancelToken: new CancelToken(token => {
    cancelAxiosRequest = token;
  })
});
Posted by: Guest on August-04-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language