What's Changed
New features
-
Upgrade commons-io to 2.11.0 (#16233)
-
Update Apache Commons File Upload to 1.5 (#16136)
-
Add upload limits for Apache File Upload (#16091)
Commit · Pull requestAdds the default limit of maximum file part count for upload (10000) and also gives an opportunity to override it and other two limits (upload maximum file size and maximum request size) by creating a custom
StreamRequestHandler
:public class CustomServiceInitListener implements VaadinServiceInitListener { @Override public void serviceInit(ServiceInitEvent event) { event.addRequestHandler(new CustomStreamRequestHandler()); } private static final class CustomStreamRequestHandler extends StreamRequestHandler { // override getFileSizeMax() and/or getRequestSizeMax() if needed @Override protected long getFileCountMax() { // your limit: return 1000; } } }
See https://vaadin.com/docs/v10/flow/advanced/tutorial-service-init-listener for more information on how to add a custom request handler.