Uploadig multiple files with different requirements is not possible.
- Dominant language
- JavaScript
- Stars
- 12.1k
- Forks
- 1.1k
- Avg merge
- 8d 2h
- Merged PRs (30d)
- 21
Description
I have a route that expects a multipart form and in this multipart form, there are two files that are going to be uploaded.
1- a video file that should have a size limit of 2GB and is going to be directly saved on disk in `public/videos`
2- a thumbnail which is an image that should have a size limit of 20MB and is going to be saved in memory to be resized with sharp and saved into a different directory which is `public/video/thumbnails`
I tried to use `upload.fields([ { name: 'video', maxCount: 1 }, { name: 'thumbnail', maxCount: 1 } ])` . but it doesn't satisfy. These two files should have different size limits and I want one to be stored in disk directly and the other one in memory.
It looks like I need two different `multer().single()` on the same route.
Is it possible with multer to do this? or any other multipart parsers?
Contributor guide
Assessment
This issue has not been assessed yet.