This Demo was uploading image and video file using multer middleware.
In the project directory, you can run:
Runs the app in the development mode.
- Open Postman and create POST request for image upload
- URL will be localhost:3000/uploadImage
- select Body in menus then select form-data
- In table write the key name
image
and select type as afile
- then after select any image
(file will only png|jpg, size less then 1MB)
- And Send the request.
- The process will be same as the single image upload
- Just change two things
- URL will be localhost:3000/uploadBulkImage
- Change kay name as a images and select multiple images.
(Select only 4 images)
- Send the request
- The process will be same as the image upload
- Just change URL localhost:3000/uploadVideo
- Change kay name as a video and select video file
(file will be only mp4|mpeg-4 and size 10MB Only)
- Send the request