Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multer removes uploaded files when an exception occurs #1279

Open
simo385 opened this issue Oct 22, 2024 · 1 comment
Open

Multer removes uploaded files when an exception occurs #1279

simo385 opened this issue Oct 22, 2024 · 1 comment
Labels

Comments

@simo385
Copy link

simo385 commented Oct 22, 2024

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

@simo385 simo385 added the bug label Oct 22, 2024
@simo385
Copy link
Author

simo385 commented Oct 31, 2024

Dear All,

updates?

Thanks in advance
Simone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant