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

106
Views
can't get a picture from different links

I have express server and special folder for images.

app.use(express.static("files"));

And if I try to get an image, for example, in localhost:3000/test from the files folder, it works. But if I try to get an image for example in localhost:3000/profile/404 from the same folder - it doesn't work

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Change the path of public to: app.use(express.static(__dirname +"/files")); And make sure you access the files with absolute paths from client:

<img src="/profile/404.png" />

On server: files --> profile --> 404.png

about 4 years ago · Juan Pablo Isaza 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!