Repository navigation
Delete the files uploaded with each request - #79
Merged
Merged
Conversation
Symfony's HttpFoundationFactory moves every file Bref uploads to a new temporary file named "symfony*", so the cleanup of Bref's Psr15Handler, which deletes "bref_upload_*" files, never found them: they stayed in /tmp until the Lambda instance stopped. The cleanup exists since Bref 2.1.13, and finds uploads on PHP 8.4 and up since Bref 3.0.13.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Files uploaded to a Symfony application running with the Bref runtime (not PHP-FPM) were never deleted: they stayed in the Lambda instance's
/tmpuntil it was full, and then everything that writes to/tmpfailed.Bref writes each upload to
/tmp/bref_upload_*, and itsPsr15Handlerdeletes those files when the next request starts. But Symfony'sHttpFoundationFactorymoves every uploaded file to a new temporary file namedsymfony*(the file is not a native PHP upload), so the cleanup never found it.KernelAdapternow names those files with Bref's prefix.Bref 3.0.13 is required on Bref 3: before it, the cleanup missed every upload on PHP 8.4 and up (brefphp/bref#2218). The cleanup exists since Bref 2.1.13.
Same fix as brefphp/laravel-bridge#219 for Laravel.