0

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 )

enter image description here

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!

spatak
  • 1,039
  • 1
  • 14
  • 25

0 Answers0