How to upload image along with some data and how to format date in mern stack

I am new in react I have to create a blog page in which admin can add blogs . In add form I need blog title image date and blog description. In backend I have to use nodejs mongo db express js. I have used multer to upload image and created route for blog model.I am stuck in image upload. I don't know how to upload image along with title date and description. How to change date format.

1 answer

  • answered 2019-05-15 05:34 Heloa

    You can upload the image first via a API call likes Cloudinary. Then, grab the image's URL after the upload completed. Finally, You will be able to send the data along with your image's URL.