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

126
Views
Expressjs static space in file name trailing slash

I use express to serve static files on local disk.

app.use('/media/', express.static(path.join(__dirname, 'media'), {redirect: false}))

And under media folder, I have a folder named image files. In that folder, I have a file called image.png.

When I use http://localhost:3000/media/image%20files/image.png in the address field of my browser, express always redirect the request to http://localhost:3000/media/image%20files/image.png/ that adding a trailing slash.

If I remove the space in the folder name, it serves the image file.

What I did wrong? Is this a bug?

Thanks,

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

To answer my own question so if anyone runs into the same issue they have a possible answer.

I cleared Chrome cache and the problem is gone.

about 4 years ago · Santiago Trujillo Report
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!