Commit 54a0a8ac authored by Michael Menzel's avatar Michael Menzel

fixed error redirect on file size too large

parent 8d9a360f
......@@ -121,10 +121,24 @@ public class ApplicationController implements ErrorController {
String handleFileException(HttpServletRequest request, Throwable ex, Model model) {
return "redirect:/filesizetoolarge";
* File exceptions are redirected to this method to call 'error' with in a post request with the message
* @param model - same as always
* @return the error page
public String filesizetoolarge(Model model){
model.addAttribute("errorMessage", "The file you tried to upload is too large. Please upload only files with a max. file size of 20 MB.");
return "error";
public String faq(){
......@@ -23,7 +23,7 @@
<a href="/" class="btn btn-outline-info">back</a>
<div id="error" class="bg-danger">
<h4>Something went wrong</h4>
<h5>Something went wrong:</h5>
<p th:text="${errorCode}"></p>
<p th:text="${errorMessage}"></p>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment