Skip to content

Fix: Complete description for Upload documentation #4445

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

Merged
merged 6 commits into from
Aug 8, 2025

Conversation

fredpena
Copy link
Contributor

@fredpena fredpena commented Jul 25, 2025

docs: enhance description of TemporaryFileUploadHandler in file-handl…

Issues #4390, which reported that the description for TemporaryFileUploadHandler in the Upload component documentation was incomplete and ended abruptly.

The updated description now clearly explains:

  • That uploaded files are stored in the system's temporary directory
  • That this handler is recommended for large files or to reduce memory usage
  • That temporary files are automatically deleted after the upload is completed or the component is detached

This improvement helps developers better understand the available UploadHandler implementations and make more informed choices based on their application's needs.

docs: Clarify Spring Boot multipart limits and stream handling in Upl…

Improves the documentation for the Upload component's file size limitations in the "Upload Restrictions > File Size" section.

It addresses a common issue encountered when using Java Flow with Spring Boot, where file uploads fail due to Spring’s default multipart request limits (typically 1MB). The update adds guidance on how to:

  • Configure larger file size limits in application.properties or application.yml.
  • Disable Spring’s multipart resolver (spring.servlet.multipart.enabled=false) when using UploadHandler or StreamReceiver.
  • Understand Spring Boot’s default behavior of intercepting and caching multipart requests, which may interfere with Vaadin’s upload lifecycle and event listeners.

This update is based on feedback from #4224 and provides more complete guidance for developers integrating Vaadin Upload with Spring Boot.

@CLAassistant
Copy link

CLAassistant commented Jul 25, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

jouni
jouni previously requested changes Jul 25, 2025
@@ -42,10 +43,12 @@ include::{root}/frontend/demo/component/upload/react/upload-basic.tsx[render,tag
endif::[]
--


Copy link
Member

Choose a reason for hiding this comment

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

Please restore these additional empty lines between sections. They help make the page structure more clear when editing the asciidoc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@fredpena fredpena changed the title Fix: Complete description for TemporaryFileUploadHandler in Upload documentation Fix: Complete description for Upload documentation Jul 25, 2025
@@ -22,7 +22,7 @@ The following built-in implementations of [classname]`UploadHandler` are availab

- [classname]`InMemoryUploadHandler`, stores uploaded files in memory
- [classname]`FileUploadHandler`, stores uploaded files to the file system
- [classname]`TemporaryFileUploadHandler`, stores uploaded files to temporary filestly even when
- [classname]`TemporaryFileUploadHandler`, stores uploaded files to temporary files, typically using the system's temporary directory. This handler is useful when dealing with large files or when memory usage needs to be minimized. The temporary files are automatically deleted when the upload is complete or the component is detached.
Copy link
Contributor

Choose a reason for hiding this comment

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

The temporary files are automatically deleted when the upload is complete or the component is detached.

Does this reflect the current implementation? I can't find such deletion in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If it's true, there was confusion on my part. The files are not automatically deleted unless you unmount the component or manually.

fredpena and others added 2 commits August 1, 2025 12:25
Remove 'The temporary files are automatically deleted when the upload is complete or the component is detached.'
@mshabarov mshabarov requested a review from jouni August 6, 2025 11:15
@peholmst peholmst added the target/main cherry pick to main branch label Aug 8, 2025
@mshabarov
Copy link
Contributor

@jouni do you have any further comments? I'd like to publish this update.

@jouni
Copy link
Member

jouni commented Aug 8, 2025

No comments right now, merge if you want 👍

@mshabarov mshabarov dismissed jouni’s stale review August 8, 2025 07:53

No blocking comments

@mshabarov mshabarov merged commit 293b2a4 into vaadin:v24 Aug 8, 2025
3 of 4 checks passed
@mshabarov
Copy link
Contributor

@fredpena thanks for contribution! 🏅

vaadin-bot pushed a commit that referenced this pull request Aug 8, 2025
* docs: enhance description of TemporaryFileUploadHandler in file-handling.adoc

* docs: Clarify Spring Boot multipart limits and stream handling in Upload file size section

* Update articles/components/upload/index.adoc

Co-authored-by: Marco Collovati <[email protected]>

* Update file-handling.adoc

Remove 'The temporary files are automatically deleted when the upload is complete or the component is detached.'

---------

Co-authored-by: Marco Collovati <[email protected]>
Co-authored-by: Mikhail Shabarov <[email protected]>
peholmst pushed a commit that referenced this pull request Aug 8, 2025
* docs: enhance description of TemporaryFileUploadHandler in file-handling.adoc

* docs: Clarify Spring Boot multipart limits and stream handling in Upload file size section

* Update articles/components/upload/index.adoc



* Update file-handling.adoc

Remove 'The temporary files are automatically deleted when the upload is complete or the component is detached.'

---------

Co-authored-by: Fred Peña <[email protected]>
Co-authored-by: Marco Collovati <[email protected]>
Co-authored-by: Mikhail Shabarov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants