Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

The easiest way of uploading image and audio files together using Multer, Cloudinary, and Node.js.

Posted on Jun 22 The project list📃 of a backend web developer always includes projects on REST API and other websites projects such as E-commerce with fully functional backends. One main functionality of these kinds of projects is file Uploading such as image, audio, video, etc. When working with MERN stack one of the most common and popular way of uploading a file is using-The most probable solutions for uploading a file found on the internet are-You have to search a lot to find the perfect solution for uploading the image and audio file together using multer, cloudinary and node.js.I hope that this blog of mine is going to help most of the backend web developers for easily uploading the image and the audio file together using multer, cloudinary and node.js.First of all let's setup the express app. Following are the steps to create an express app. Create a folder server which contains a server.js file which will be the root file. Run the following command to initiate the node modules.Once the initial setup is done we will move further with the:-Now lets setup the Multer file which is in the middlware folder.For uploading the image and audio file together we are going to use a third party dependency namely multer-storage-cloudinaryIn the following way the multer setup is done using the third party dependency. Now we will use the upload.fields as a middleware.We are also going to setup the cloudinary in the cloudinaryconfig.js file so as to use it as a middleware in the server.js file.Once the setup of Multer, Cloudinary is done we will take a quick peek of the controller.js.In the uploadcontrol.js file:-Once the entire setup is done we will check the upload request on PostmanHurrey!🥳🥳 we are successfully receiving the url of both the files.And also getting the url stored in mongodb.So I hope that this tutorial is going to help all the backend web developers out there in uploading the image and audio file together using Multer, Cloudinary and Node.jsTemplates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse axel blaze - May 28 Kelechi Kizito Ugwu - May 24 Salah Eddine Lalami - Jun 8 Quentin Philippot - May 23 Once suspended, itsfarhankhan28 will not be able to comment or publish posts until their suspension is removed. Once unsuspended, itsfarhankhan28 will be able to comment and publish posts again. Once unpublished, all posts by itsfarhankhan28 will become hidden and only accessible to themselves. If itsfarhankhan28 is not suspended, they can still re-publish their posts from their dashboard. Note: Once unpublished, this post will become invisible to the public and only accessible to FARHAN KHAN. They can still re-publish the post if they are not suspended. Thanks for keeping DEV Community safe. Here is what you can do to flag itsfarhankhan28: itsfarhankhan28 consistently posts content that violates DEV Community's code of conduct because it is harassing, offensive or spammy. Unflagging itsfarhankhan28 will restore default visibility to their posts. DEV Community — A constructive and inclusive social network for software developers. With you every step of your journey. Built on Forem — the open source software that powers DEV and other inclusive communities.Made with love and Ruby on Rails. DEV Community © 2016 - 2023. We're a place where coders share, stay up-to-date and grow their careers.



This post first appeared on VedVyas Articles, please read the originial post: here

Share the post

The easiest way of uploading image and audio files together using Multer, Cloudinary, and Node.js.

×

Subscribe to Vedvyas Articles

Get updates delivered right to your inbox!

Thank you for your subscription

×