These are chat archives for Automattic/mongoose

May 2018
May 27 2018 19:14
Hi everyone, I'm confronted to a new problem, I stored my images in mongodb, but don't know what is the right way to retrieve it and display it. I wrote a route in my back (with node.js) which returns a response as follow :
here are user products [ { _id: 5b0afec48fc9a34f45384bde,
    title: 'Sofa',
    content: 'Sofa',
    price: '900',
    image: 'uploads/2018-05-27T18:53:56.811Zsofa.jpg',
    senderId: '5aff16af88a5ae192e3ca7db',
    createdDate: 2018-05-27T18:53:56.840Z,
    __v: 0 } ]
And in my front, I tried to display my image this way but it doesn't work :
<img :src="http://localhost:8080/uploads/2018-05-27T18:53:56.811Zsofa.jpg">
I tried a lot of stuffs, but the image still not showing :(