Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 744 Bytes

File metadata and controls

51 lines (32 loc) · 744 Bytes

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 :)