- React
- Redux
- MongoDB
I have developed a platform for users to share text and an image with their posts.
Currently, I am assigning the complete URL of the image associated with each post using post.postPicture
. This method is functional.
The images are saved in the MongoDB storage under /$useruid/$filename
.
However, in case the filename
or userid
changes (assuming the path remains unfixed), what would be the best approach to reference the correct image for each post?