Skip to content

Conversation

@Artur-
Copy link
Member

@Artur- Artur- commented Nov 23, 2025

Add ability to reject file uploads during processing with optional
rejection messages. The rejection status is tracked per-file and
communicated back to the client via appropriate HTTP status codes:

  • 200 OK: all files accepted
  • 422 Unprocessable Entity: all files rejected (with JSON body)
  • 207 Multi-Status: mixed results (with JSON body)

Key changes:

  • Add reject() and reject(String) methods to UploadEvent
  • Extend UploadResult record with acceptedFiles/rejectedFiles tracking
  • Add UploadResult.Builder for incremental result construction
  • Move JSON response handling into UploadHandler.responseHandled()
  • Add rejected() callback to FileUploadCallback and InMemoryUploadCallback

@Artur- Artur- force-pushed the reject-file-upload branch from f8f15ab to eff2c54 Compare November 23, 2025 12:59
@vaadin vaadin deleted a comment from github-actions bot Nov 23, 2025
@github-actions
Copy link

github-actions bot commented Nov 23, 2025

Test Results

1 299 files  + 1  1 299 suites  +1   1h 17m 40s ⏱️ +14s
9 114 tests +16  9 046 ✅ +16  68 💤 ±0  0 ❌ ±0 
9 571 runs  +18  9 495 ✅ +17  76 💤 +1  0 ❌ ±0 

Results for commit bc1544e. ± Comparison against base commit 7dfa668.

♻️ This comment has been updated with latest results.

@mshabarov mshabarov requested a review from caalador November 24, 2025 12:37
Add ability to reject file uploads during processing with optional
rejection messages. The rejection status is tracked per-file and
communicated back to the client via appropriate HTTP status codes:

- 200 OK: all files accepted
- 422 Unprocessable Entity: all files rejected (with JSON body)
- 207 Multi-Status: mixed results (with JSON body)

Key changes:
- Add reject() and reject(String) methods to UploadEvent
- Extend UploadResult record with acceptedFiles/rejectedFiles tracking
- Add UploadResult.Builder for incremental result construction
- Move JSON response handling into UploadHandler.responseHandled()
- Add rejected() callback to FileUploadCallback and InMemoryUploadCallback
Remove unnecessary UploadResult.Builder class and use direct list
accumulation in TransferUtil. This simplifies the code flow by
eliminating mutable state passed as method parameters, making the
upload handling logic clearer and more maintainable.
@Artur- Artur- force-pushed the reject-file-upload branch from eff2c54 to bc1544e Compare November 28, 2025 13:53
@github-actions github-actions bot added +0.1.0 and removed +1.0.0 labels Nov 28, 2025
@sonarqubecloud
Copy link

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.

2 participants