So I saved an image on mongodb by using URL.createObjectURL(evt.target.files[0])
, and now when I retrieve it from mongodb in my react app it doesn't work, it is not displayed.
I have this object that gets populated with the users that I get from mongodb:
<div className="content">
<h2>{user.name}</h2>
<p>{user.job}</p>
<img src={user.picture ?? ''} alt='' />
</div>
On mongodb the picture proerty looks like this:
{
picture: "http://localhost:3000/17d6055e-6b1f-440a-bb6a-bac0af1e7530"
}
Bu when I want to use it my image src in react it doesnt show anything