I have few question concerning image storage on a website.
For efficiency, I store images on local disk and image path into db. say, image1.png stores on uploads/img
folder with path(from req.file.path
) as uploads/img/image1.png
.
now, how to access this path via url. I have tried to call
http://localhost:3000/uploads/img/image1.png
and
file:///uploads/img/image1.png
but nothing worked.
any help.