I have a system where I need to upload images to MySQL and display them in my system. I am able to save the pictures uploaded, however I am having trouble displaying the pictures. When I copied the path of one of my pictures, the path on my inspect element would be something like this:
src="file:///C:/Users/User/myproject/client/public/images/image-1648889022596.png"
So I saved the image in MySQL as above path. However, my system won't show the picture. Here is my simple code for showing the pictures on front-end:
<Row className = "mb-5 text-center">
<Col className = "fw-bold">Image</Col>
<Col className = "fw-bold">Name</Col>
{attachmentList.map((val2, key2) => {
return(
<div key = {key2}>
<Row>
<Col>
<Image
src={val2.project_attachment_url}
/>
</Col>
<Col>
{val2.project_attachment_name}
</Col>
</Row>
</div>
)
})}
</Row>
I appreciate any help given to me regarding this matter, thank you!