We developed an express API to upload multiple files to S3. The API works successfully, but we've noticed a weird behavior when an exception occurs when multiple files are uploaded.
Scenario
Suppose we upload 10 files where the 7th and 9th exceed the size limit.
Current behavior
The API catches the error successfully, but, any file to S3 is uploaded.
Expected behavior
Files 1,2,3,4,5,6,8,10 should be uploaded to S3 successfully, on the other hand, the Multer should inform us that files 7 and 9 have not been uploaded because of the "LIMIT_FILE_SIZE" exception.
Environment
Node 20
Express4
AWS S3 (storage)
IMHO, this bug should be fixed asap, to avoid unexpected behavior in the future.
Hi everybody,
We developed an express API to upload multiple files to S3. The API works successfully, but we've noticed a weird behavior when an exception occurs when multiple files are uploaded.
Scenario
Suppose we upload 10 files where the 7th and 9th exceed the size limit.
Current behavior
The API catches the error successfully, but, any file to S3 is uploaded.
Expected behavior
Files 1,2,3,4,5,6,8,10 should be uploaded to S3 successfully, on the other hand, the Multer should inform us that files 7 and 9 have not been uploaded because of the "LIMIT_FILE_SIZE" exception.
Environment
Node 20 Express4 AWS S3 (storage)
IMHO, this bug should be fixed asap, to avoid unexpected behavior in the future.
Thanks in advance, Simone