9. Working with Node.js
Activity 9.01: Create a Web Application to Upload, Store, and Save Image Details
Solution
- Let's first go through the directory structure and define the folders to upload the images:
As you can see, in this project you will try to upload images in the
public/images
directory. This directory must be present at the root of the project and the current user should have read and write access to this directory. By default, you will get both the permissions to this directory.Note
The source code will only contain two files (
app.js
andpackage.json
). All the other files shown in theimages
directory in the preceding figure will not be present there. Once you start uploading files, you will see all the uploaded images there.Before proceeding further, be sure to create a
public/images
directory in the root of this project that relates toapp.js
andpackage.json
. The currently logged-in user of your...