See https://javadoc.io/doc/org.apache.wicket/wicket-core/9.4.0/org/apache/wicket/markup/html/form/upload/FilesSelectedBehavior.html
This behavior can be used to get an AJAX round trip to the server when the user selects a file (or files). Then you can use that information to let the user know the selected file is bigger than it should (and possibly disable the upload "button"). On Thu, Jun 9, 2022 at 2:57 PM Ryo Tsunoda <[email protected]> wrote: > Hi. > > Looking at Form#onFileUploadException, I see that it sets an error message > (resource key: uploadTooLarge), is there any way to display this error in > the browser? > > I use Form#setMaxSize and ApplicationSettings#setDefaultMaximumUploadSize > methods. > When I upload a file that exceeds these settings, I would like to return a > response with an error message and display it on browser. However, the > browser displays [ERR_CONNECTION_RESET] now. > > > Regards, > Ryo Tsunoda. > -- Regards - Ernesto Reinaldo Barreiro
