Answer the question
In order to leave comments, you need to log in
Need to upload photos to the server (mongoose), via React, redux, react-redux?
Can someone explain, upload a video or material on how to upload
Images, files, drag and drop with React + mongoose + redux front + back, or at least just select and upload
Answer the question
In order to leave comments, you need to log in
Your question can be divided into two parts (at least): getting files on the client via input/dropzone and sending those files to the server.
Getting files on the client
As for uploading photos to the server in mongo - in my opinion, it's not the best idea to store photos and media files in general in the database. It is better to upload them somewhere to the cloud via api and write only their url to mongo.
If you really want to store the photos themselves in Mongo, then you need to decide in what format you will store them: buffer, base64 or whatever else is there, and based on the choice, convert the user photo to the appropriate format and write
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question