-
Notifications
You must be signed in to change notification settings - Fork 919
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 remove multipart temporary files #5652
Labels
Comments
ikhoon
added a commit
to ikhoon/armeria
that referenced
this issue
Apr 30, 2024
Motivation: Armeria does not automatically delete the uploaded files, so users should manually remove the temporary files themselves. It would be useful if we provided some options for how to delete multipart temporary files. Related: line#5652 Modifications: - Add `MultipartRemovalStrategy` that is used to determine how to delete multipart files. For now, three options are supported. - NEVER - ON_RESPONSE_COMPLETION - ON_JVM_SHUTDOWN - Add builder methods to server/virtualhost/service builders. Breaking changes: - Multipart temporary files are now automatically removed when a response is fully sent. If you want to keep the existing behavior, use `MultipartRemovalStrategy.NEVER. Result: You can now specify when to remove multipart temporary files using `MultipartRemovalStrategy`. ```java Server .builder() .multipartRemovalStrategy(MultipartRemovalStrategy.ON_RESPONSE_COMPLETION) ```
minwoox
pushed a commit
that referenced
this issue
May 30, 2024
Motivation: Armeria does not automatically delete the uploaded files, so users should manually remove the temporary files themselves. It would be useful if we provided some options for how to delete multipart temporary files. Related: #5652 Modifications: - Add `MultipartRemovalStrategy` that is used to determine how to delete multipart files. For now, three options are supported. - NEVER - ON_RESPONSE_COMPLETION - ON_JVM_SHUTDOWN - Add builder methods to server/virtualhost/service builders. Breaking changes: - Multipart temporary files are now automatically removed when a response is fully sent. If you want to keep the existing behavior, use `MultipartRemovalStrategy.NEVER`. Result: - You can now specify when to remove multipart temporary files using `MultipartRemovalStrategy`. ```java Server .builder() .multipartRemovalStrategy(MultipartRemovalStrategy.ON_RESPONSE_COMPLETION) ``` - Fixes #5652
Dogacel
pushed a commit
to Dogacel/armeria
that referenced
this issue
Jun 8, 2024
…#5653) Motivation: Armeria does not automatically delete the uploaded files, so users should manually remove the temporary files themselves. It would be useful if we provided some options for how to delete multipart temporary files. Related: line#5652 Modifications: - Add `MultipartRemovalStrategy` that is used to determine how to delete multipart files. For now, three options are supported. - NEVER - ON_RESPONSE_COMPLETION - ON_JVM_SHUTDOWN - Add builder methods to server/virtualhost/service builders. Breaking changes: - Multipart temporary files are now automatically removed when a response is fully sent. If you want to keep the existing behavior, use `MultipartRemovalStrategy.NEVER`. Result: - You can now specify when to remove multipart temporary files using `MultipartRemovalStrategy`. ```java Server .builder() .multipartRemovalStrategy(MultipartRemovalStrategy.ON_RESPONSE_COMPLETION) ``` - Fixes line#5652
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When files are uploaded to an Armeria server with
multipart/form
, it is stored tomultipartUploadsLocation()
when@Param
of annotated services or GraphQL multipart request is used.https://armeria.dev/docs/server-multipart#using-typeparam-annotation
armeria/graphql-protocol/src/main/java/com/linecorp/armeria/server/graphql/protocol/AbstractGraphqlService.java
Lines 101 to 103 in 0a5a3d7
As Armeria does not automatically delete the uploaded files, users should manually remove the temporary files themselves.
armeria/graphql-protocol/src/main/java/com/linecorp/armeria/server/graphql/protocol/AbstractGraphqlService.java
Lines 101 to 103 in 0a5a3d7
It would be useful if we provided some options for how to handle multipart files.
The option can be set via
ServerBuilder
,VirtualHostBuilder
, orServiceBindingBuilder
.The text was updated successfully, but these errors were encountered: