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

Automatically clean up multipart temp files #27633

Closed
poutsma opened this issue Nov 2, 2021 · 3 comments
Closed

Automatically clean up multipart temp files #27633

poutsma opened this issue Nov 2, 2021 · 3 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@poutsma
Copy link
Contributor

poutsma commented Nov 2, 2021

The DefaultPartHttpMessageReader creates temp files that are never deleted. There should be an option to delete these files after the corresponding request was handled.

Related to #27613, the resolution of which introduced a Part::delete method to explicitly remove the temp file. This issue focusses on automatically removing these temp files.

@poutsma poutsma added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement labels Nov 2, 2021
@poutsma poutsma added this to the 6.0 M2 milestone Nov 2, 2021
@poutsma poutsma self-assigned this Nov 2, 2021
@vovaspk
Copy link

vovaspk commented Nov 3, 2021

@poutsma hi, do you know if it is possible to disable creating temp file? when for example i know i will be receiving files around 10mb, and i want to save them right to the storage from memory, without creating temp file and then copying

@poutsma
Copy link
Contributor Author

poutsma commented Nov 3, 2021

@vovaspk You will need to change the maxInMemorySize for the DefaultPartHttpMessageReader by using the ServerCodecConfigurer, see https://docs.spring.io/spring-framework/docs/current/reference/html/web-reactive.html#webflux-config-message-codecs

@vovaspk
Copy link

vovaspk commented Nov 3, 2021

Thank you very much!

@poutsma poutsma modified the milestones: 6.0 M2, 6.0 M3 Dec 9, 2021
@poutsma poutsma modified the milestones: 6.0.0-M3, 6.0.0-M4 Mar 15, 2022
@poutsma poutsma closed this as completed in 192f2be Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants