1

How to upload a file and save into a mongodb document. In my form, i have two button 1. for upload a file and 2. for save the document. But am not sure about the flow here. Am using reactjs as my frontend. Please suggest.

1 Answer 1

0

MongoDb provides you the option to store images. MongoGridFS.

Study more about MongoGridFS

On click of a button, make a call to upload the image uploaded and save the image in the mongoDB.

You just need to send form data through ajax and take the save functionality in the back end

Upload Image

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.