'How can I download image using GridFSBucket?
I tried everything I found on internet but nothing solved my problem. I really need help on this problem.
I'm following the tutorial "How to upload/store images in MongoDB using Node.js, Express & Multer" (https://www.bezkoder.com/node-js-upload-store-images-mongodb/).
I successfully uploaded the images. I can see the images on my navigator if I use the url from my backend (http://localhost:8080/chat/files/9f722635-bffc-4d4c-aa71-340c4a488ac2.jpeg). However, I can't use this url to display the image on my frontend (react native).
The problem doesn't seem to be related to my frontend, as I can access images from any other url with the same code. Moreover, when I tried to make a GET request on the postman with the same url, the image is not displayed in the body of the response.
My code is exactly the same of the tutorial.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
