Uploading multiple files with validation node api | API development

Published At: 1 year ago
Published By: Santosh Kumar
Downloads: 0
Watch Video
NodeJs express js mongodb

This project involves the creation of a RESTful API in Node.js and Express.js to facilitate the uploading of multiple files while applying validation checks on the uploaded files. The uploaded files are stored both in a designated directory on the server and in a MongoDB database. This versatile API is a useful tool for applications that require users to upload and manage files securely.

1. Features of the project:

1. The API allows users to upload multiple files as well as single files.

2. API performs validation checks on the uploaded files. these checks include verifying file types, checking for file size limits, and ensuring the files meet specific criteria.

3. Uploaded files are stored in a designated directory on the server.

4. The project stores information about the uploaded files in a MongoDB database.

5. Security is a critical feature. Ensure that your API has proper authentication and authorization mechanisms in place to protect sensitive data.

2. Steps to create and set up the project:

a) Installation process:

  1. Install node js if you haven’t installed it.
  2. Install required packages express, mongoose, body-parser, multer, nodemon

a) Run project:

1. Run the command to start the server by using the command npm start