I am build an api route which will be responsible for uploading media (images/videos) to the S3 bucket.
For that I am using Multer as express middleware.
Before uploading videos to the server, I am trying to save them on the disk using multer({dest: ''}), however I don't want to save images on the disk, that's why I am creating two instances of multer (imageUpload - for image upload and videoUpload for video upload )
On hitting the given endpoint in the image, I am getting the following error: MulterError: Unexpected field
The field names from the FormData were double checked. I am sure it's a problem with 2 multer middlewares there.
Thank you mates in advance!