Skip to content

dcyar-learning/node-file-upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Upload files with NodeJs

Upload options:

  • Upload to public directory
  • Upload to cloudinary

Packages

  • express
  • express-fileupload
  • cloudinary
  • uuid

Instructions

  1. Clone this repository
git clone https://github.com/dcyar-learning/node-file-upload

cd node-file-upload

cp .env.example .env
  1. Set your cloudinary url on .env file
CLOUDINARY_URL=xxx-xxxx-xxxx
  1. Install dependencies and run, I use pnpm in this project
pnpm install

pnpm start

# With nodemon
pnpm dev
  1. Upload options
  • Visit http://localhost:3000 for upload to public folder
  • Visit http://localhost:3000/cloudinary for upload to cloudinary

Enjoy :)