aacassandra / vue3-progressbar

https://www.npmjs.com/package/@aacassandra/vue3-progressbar
MIT License
55 stars 15 forks source link

ProgressBar finished when the request takes to long time #15

Open TSerra-PT opened 9 months ago

TSerra-PT commented 9 months ago

Hello Everyone, I am using this progressbar in vue3 with axios api. Is this my code:

instance.interceptors.request.use((config) => {
  app.$Progress.start(); // for every request start the progress
  return config;
});

instance.interceptors.response.use((response) => {
  app.$Progress.finish(); // finish when a response is received
  return response;
});

My problem is: when the request takes too long (for example: when I am uploading some images) the progressbar finished but the request stills continue in execution and the user thinks that the request finished with success. Is there any way to continue with the progressbar during the time of request?