Thanks for the reply. I have tried it and I can display the error without changing the request limit. Thank you.
It does not seem to work well when used with FileUploadField#setRequired. I will change the implementation of the required validation and then use that. 2022年6月10日(金) 16:21 Ernesto Reinaldo Barreiro <reier...@gmail.com>: > 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 <try0.developm...@gmail.com> > 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 >