Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

285
Views
Axios onUploadProgress not being called in desktop alone (works in mobile)

I have the following code being executed to upload media.

const config = {
        method: method || 'post',
        url,
        headers: {
            ...headers,
            ...extraHeaders
        },
        data,
        cancelToken: new axios.CancelToken((cancel) => {
            // An executor function receives a cancel function as a parameter
            cancelFn = cancel;
        }),
    };
    if (onDownloadProgress) {
        config.onDownloadProgress = onDownloadProgress;
    }
    if (onUploadProgress) {
        config.onUploadProgress = onUploadProgress;
        // config.progress = onUploadProgress; // Tried this too!
    }
    try {
        console.log({config});
        response = await axios(config);
    } catch (err) {
        console.log({err});
        response = err.response;
    }
    console.log(response);

When I pass the method as put, a valid url (without any CORS issue), and callback for onUploadProgress, I find that onUploadProgress is never being called in Desktop Chrome browser. But it is being successfully called in mobile chrome browser. There is not device specific implementation here, the api call is same for any device.

Axios version: 0.27.2

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!