Spring Boot + Thymeleaf + htmx: MaxUploadSizeExceededException(413) handling #8
Replies: 3 comments
-
I tried with response-targets.js as well to handle the 5**/4** error, but it is still not working.
|
Beta Was this translation helpful? Give feedback.
-
Can you try what happens if you remove |
Beta Was this translation helpful? Give feedback.
-
I tried it and explored further, and found the response of two scenarios Case 1: (Successfull upload) Response
Case 2: (File Size exceeds 12 MB) Response
There is a mismatch for the header in success and failed scenario. Means, the connection is closed. |
Beta Was this translation helpful? Give feedback.
-
There is an endpoint to upload a file, and I am trying to handle the MaxUploadSizeExceededException(Global) and show the custom message on the UI.
But the application is not showing the error message on the UI.
Console error:
Here is the code that I have tried so far:
pom.xml
application.properties
FileUploadController.java
GlobalExceptionHandler .java
upload.html
message.html
Could you point me in the right direction or tell me what I am missing?
Beta Was this translation helpful? Give feedback.
All reactions