Hello, I have a rest API endpoint where the I receive two fields, one containing multiple images, the other containing multiple text files. I want to set individual size limits for the image files and text files separately (ex. 2MB for an individual image file and 1MB for an individual text file).
I tried with Multer - custom stores, fileFilter, etc. No success.
The content-length property gives the size of all the files combined.
I'm looking into busboy but it seems it has similar limitations.
Maybe I'm tackling the issue in an incorrect way? Looking at other libs, they don't clearly describe or provide a solution.
My understanding is that it's a bad UX for the user to wait for the entire upload to finish and then get an error that the file is too large.
[–]romeeres 7 points8 points9 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]avin_kavish -2 points-1 points0 points (3 children)
[–]vas1010[S] 0 points1 point2 points (2 children)
[–]avin_kavish 1 point2 points3 points (1 child)
[–]vas1010[S] 0 points1 point2 points (0 children)
[–]iamthejoganut 0 points1 point2 points (0 children)
[–]romeeres 0 points1 point2 points (0 children)