0

Am trying to get the progress of a normal post request that takes at least 5 to 10sec. This request is validating data and uploading files to third party api. The issue is, i want to display some kind of progress feedback on my react app for it.

I've been using axios onUploadProgress and onDownloadProgress and checking what is happening but nothing.

            onUploadProgress: (progress) => {
                console.log("onUpload", progress)
                
            },
            onDownloadProgress: (progress) => {
                console.error("onDownload ", progress)
            }

How can i for every step i have in my node controller send back a manual progress indicator ?

Ahmed Commando
  • 723
  • 2
  • 7
  • 23
  • I think you are looking for something similar to this Question - [Link](https://stackoverflow.com/q/44936028/9475102) – Nishant S Vispute Mar 04 '21 at 13:51
  • it is not the same because in this case there is no file upload, just a normal post request. – Ahmed Commando Mar 04 '21 at 13:52
  • File or Form the logic seems to work.. we will need some refactoring for handling the files which can be learned from axios documentation – Nishant S Vispute Mar 04 '21 at 13:55
  • exactly what i've been doing for the last 3hrs before coming here. I want to send progress manually after each task in node, intercept it with axios for progress. And without using res.write id possible – Ahmed Commando Mar 04 '21 at 13:56

0 Answers0