Bad Request ZnEntityTooLarge

Bernhard Pieber <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside,gmane.comp.lang.smalltalk.pharo.user
Message-ID <[email protected]>
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
_______________________________________________
seaside mailing list
[email protected]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.