[Seaside] Bad Request ZnEntityTooLarge
Bernhard Pieber
bernhard at pieber.com
Thu Jan 19 12:32:59 UTC 2017
I have a Seaside application which includes a file upload feature.
renderContentOn: html
…
html fileUpload
callback: [ :file | self receiveFile: file ].
html submitButton: 'Upload‘ ]
…
In receiveFile: I just save the uploaded file on the file system.
When I upload a file larger than 16 MB an error page is shown with the error message:
Bad Request ZnEntityTooLarge
I found that by using ZnConstants>>maximumEntitySize: I can increase this limit. However, I want to catch this in the image and show an error message to the user.
I tried wrapping receiveFile: and renderContentOn: with an on:do: exception handler for ZnEntityTooLarge. However, neither works. It seems that the error happens before renderContentOn: is even called. I searched the mailing lists but did not come up with an answer.
How can I achieve this in Seaside? Any help would be much appreciated.
Cheers,
Bernhard
More information about the seaside
mailing list