[Vuejs]-Upload Media files to MongoDB from Node.js server

0👍

What you are looking for, is creating an API in node.js to handle uploaded file. (You can use express.js to make your life easier if you are not already using it)

In Vue.js create a component to upload a file and store the files in the file system on the server might be in a folder that is accessible through the web server (like in a public folder).

Finally, save the URL to access the file in MongoDB so, you can reference it later. You can google for tutorials on this, an example is here.

Leave a comment