In this tutorial, we’ll take another look at uploading files with Node.js but this time we’ll focus on saving the file paths of the uploaded files so they can be used in your application.

Code is here on GitHub: https://github.com/codebubb/tutorial-nodejs-file-upload (checkout the ‘database’ branch for the completed code).

Check out the first part of the tutorial here: https://youtu.be/ysS4sL6lLDU

Saving files paths to a database

00:00 Introduction
00:50 Installing Mongoose
01:13 Creating Mongoose Models
03:48 Saving file paths to the database
07:20 Testing uploading files
10:15 Retrieving the stored file paths
15:56 Redirecting the upload route
17:31 Summary

#node.js #database

How To Upload Files With Node.js  - Saving file paths to a database
3.85 GEEK