Package com.vaadin.flow.server.streams
Interface UploadMetadataCallback
- All Superinterfaces:
Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Callback for validating an upload's metadata before any data is read, used
with
AbstractUploadHandler.validateMetadata(UploadMetadataCallback).
Call UploadEvent.reject(String) to refuse the upload. See
UploadValidator.validateMetadata(UploadEvent) for the phase
semantics.
- Since:
- 25.3
-
Method Summary
Modifier and TypeMethodDescriptionvoidvalidate(UploadEvent event) Validates the upload metadata, rejecting it viaUploadEvent.reject(String)if it must not be stored.
-
Method Details
-
validate
Validates the upload metadata, rejecting it viaUploadEvent.reject(String)if it must not be stored.- Parameters:
event- the current upload- Throws:
IOException- if validation fails; treated as a transfer error
-