- Upload to public directory
- Upload to cloudinary
- express
- express-fileupload
- cloudinary
- uuid
- Clone this repository
git clone https://github.com/dcyar-learning/node-file-upload
cd node-file-upload
cp .env.example .env
- Set your cloudinary url on
.env
file
CLOUDINARY_URL=xxx-xxxx-xxxx
- Install dependencies and run, I use pnpm in this project
pnpm install
pnpm start
# With nodemon
pnpm dev
- Upload options
- Visit
http://localhost:3000
for upload to public folder - Visit
http://localhost:3000/cloudinary
for upload to cloudinary
Enjoy :)