i have data json, i receive json data from backend with following format.
{
id: 2
name: file impian
file : /home/bakcend/go/uploads/173ba017f27b69b42d7e747.png //path backend
}
currently a separate directory, files uploaded from the front end go to the backend folder
- home
- backend
- go
- uploads
- api
this is the front end folder
- home
- front end
- src
- view
- component
- other
url backend : ...8001 frontend : ...8002
just a different port
how can i load data outside the root front end ?
<b-img src="http://....:8001/home/backend/go/upload/173ba017f27b69b42d7e747.png"></b-img>
I tried it doesn't load
You should serve static files from your backend. Add some code to your backend for serving static files. for example in node we can do like this: express.js serve static files