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

fix: delete file when user cancels request #567

Merged

Conversation

IqbalLx
Copy link
Contributor

@IqbalLx IqbalLx commented Jan 17, 2025

fixes #546

Checklist

Signed-off-by: Matteo Collina <hello@matteocollina.com>
@mcollina
Copy link
Member

I think the behavior being tested here is correct. saveRequestFiles() is correctly saving all file on disk, and it successfully completes. The case shown in #546 is somewhat different because the upload is incomplete in that case.

However I've tested incomplete downloads and I couldn't reproduce it either.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
@mcollina
Copy link
Member

I've uploaded the reproduction and fix

Signed-off-by: Matteo Collina <hello@matteocollina.com>
Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, lint is failing

Signed-off-by: Matteo Collina <hello@matteocollina.com>
@Uzlopak Uzlopak changed the title Delete file when user cancel request fix: delete file when user cancels request Jan 23, 2025
@mcollina mcollina merged commit 7b69489 into fastify:master Jan 23, 2025
11 checks passed
mcollina added a commit that referenced this pull request Jan 23, 2025
* adding new test

* fixup

Signed-off-by: Matteo Collina <hello@matteocollina.com>

* fixup

Signed-off-by: Matteo Collina <hello@matteocollina.com>

* fixup

Signed-off-by: Matteo Collina <hello@matteocollina.com>

* fixup

Signed-off-by: Matteo Collina <hello@matteocollina.com>

---------

Signed-off-by: Matteo Collina <hello@matteocollina.com>
Co-authored-by: Matteo Collina <hello@matteocollina.com>
mcollina added a commit that referenced this pull request Jan 23, 2025
* adding new test

* fixup

Signed-off-by: Matteo Collina <hello@matteocollina.com>

* fixup

Signed-off-by: Matteo Collina <hello@matteocollina.com>

* fixup

Signed-off-by: Matteo Collina <hello@matteocollina.com>

* fixup

Signed-off-by: Matteo Collina <hello@matteocollina.com>

---------

Signed-off-by: Matteo Collina <hello@matteocollina.com>
Co-authored-by: Matteo Collina <hello@matteocollina.com>
mcollina added a commit that referenced this pull request Jan 23, 2025
* adding new test

* fixup

Signed-off-by: Matteo Collina <hello@matteocollina.com>

* fixup

Signed-off-by: Matteo Collina <hello@matteocollina.com>

* fixup

Signed-off-by: Matteo Collina <hello@matteocollina.com>

* fixup

Signed-off-by: Matteo Collina <hello@matteocollina.com>

---------

Signed-off-by: Matteo Collina <hello@matteocollina.com>
Co-authored-by: Matteo Collina <hello@matteocollina.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

saveRequestFiles doesnt delete file when user cancels request
5 participants