Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aman1-2/files-uploading-server
This Node.js-based project implements a versatile file upload management system. Leveraging Express.js and MongoDB, it enables seamless uploading of various file types to local or Cloudinary servers. With features like automatic resizing, data validation, and email notifications upon successful uploads, it offers a robust solution for handling file
https://github.com/aman1-2/files-uploading-server
cloudinary dotenv expressjs javascript mongodb mongoose nodemailer rest-api
Last synced: 1 day ago
JSON representation
This Node.js-based project implements a versatile file upload management system. Leveraging Express.js and MongoDB, it enables seamless uploading of various file types to local or Cloudinary servers. With features like automatic resizing, data validation, and email notifications upon successful uploads, it offers a robust solution for handling file
- Host: GitHub
- URL: https://github.com/aman1-2/files-uploading-server
- Owner: aman1-2
- License: mit
- Created: 2024-05-04T14:23:51.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-08-04T13:41:16.000Z (6 months ago)
- Last Synced: 2024-08-04T15:37:34.466Z (6 months ago)
- Topics: cloudinary, dotenv, expressjs, javascript, mongodb, mongoose, nodemailer, rest-api
- Language: JavaScript
- Homepage:
- Size: 231 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Project Description: File Upload Management System
## Overview
This project aims to create a robust file upload management system utilizing Node.js, Express.js, MongoDB, and Cloudinary. It facilitates the seamless upload of various file types, such as images and videos, to either local or cloud servers while ensuring data validation and integrity.## Project Structure
### Config Folder
- **cloudinary.js**: Configures Cloudinary settings for file storage and retrieval.
- **database.js**: Establishes a connection to the MongoDB database.### Controllers Folder
- **uploadController.js**: Handles file upload operations, including local file upload, image upload to Cloudinary, video upload to Cloudinary, and image size reduction for Cloudinary.### Models Folder
- **file.js**: Defines the Mongoose schema for storing file details in the MongoDB database. Implements middleware for sending email notifications upon successful file uploads.### Routes Folder
- **fileUpload.js**: Defines API routes for file upload operations.### Other Files
- **.env**: Stores environment variables such as database URL, Cloudinary credentials, and mail server configuration.
- **index.js**: Main entry point of the application. Configures Express server, establishes database and Cloudinary connections, defines routes, and launches the server.## Features
- **Local File Upload**: Supports uploading files to the local server with validation and storage in a designated folder.
- **Image and Video Upload to Cloudinary**: Enables uploading images and videos to Cloudinary cloud storage with validation and automatic resizing.
- **Email Notification**: Sends email notifications to users upon successful file uploads.
- **Data Validation**: Ensures that only supported file types are uploaded and processed.
- **Middleware**: Utilizes pre and post middleware for executing actions before and after database operations, enhancing functionality and scalability.## Getting Started
1. Clone the repository to your local machine.
2. Install dependencies using `npm install`.
3. Set up environment variables in the `.env` file.
4. Run the application using `npm start`.
5. Access the API endpoints to perform file upload operations.## Dependencies
- **Express.js**: Web framework for Node.js.
- **Mongoose**: MongoDB object modeling for Node.js.
- **Cloudinary**: Cloud-based image and video management platform.
- **Nodemailer**: Module for sending emails from Node.js applications.
- **dotenv**: Loads environment variables from a `.env` file into `process.env`.## Contributors
- Aman Pratap Singh## License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).