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

260
Views
"POST http://localhost:4000/api/upload_file net::ERR_BLOCKED_BY_CLIENT" when post formdata via fetch

I am trying to make file upload app with containerized React & Node.js. I got stuck with the error when I try to upload file. The developer console says like this on the VPS server.

 POST http://localhost:4000/api/upload_file net::ERR_BLOCKED_BY_CLIENT

I built Node.js docker container at http://localhost:4000 and accepts post request to the route /api/upload_file and React container at http://localhost:3000 which accepts get request to the frontend.

My frontend javascript file related to fetch is here.

const TARGET = process.env.TARGET || 'localhost:4000'

export default async function uploadFile(formData) {
  const fetchedData = await fetch(`http://${TARGET}/api/upload_file`, {
    method: 'POST',
    body: formData 
  })
  .then((response) => {
    if (response.ok) {
      return response.json()
    } else {
      throw new Error('Something went wrong')
    }
  })
  .then(res => {
    return { 
      filename: res?.filename
    }
  })
  .catch((error) => {
    console.log(error)
  })
  return fetchedData
} 

I searched for the solutions, but it seems browser's adblocker causes the error... I tried Chrome, Firefox and Brave, and had the same results.

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!