Hi,

I can reproduce your finding with Chrome and Jetty:

Jetty has a default form submit limit of 200000 bytes which is hit before your limit is even taken into consideration. wicket-ajax seems not to be able to get hold on the response.

If I use Firefox instead of Chrome, wicket-ajax's handleMultipartComplete() is never called at all :/.

What's your container's upload limit? Can you confirm that you get a correct error message, when you upload a file bigger than your form's max size, but smaller than your containers limit?

Regards
Sven


Am 28.09.2017 um 15:10 schrieb Andrea Patricelli:
Hi all,

I've a Multipart form defined in this way:

Form<T> uploadForm = new StatelessForm<>("uploadForm");
uploadForm.setMultiPart(true);
uploadForm.setMaxSize(Bytes.megabytes(4));

Like you can see I defined a maximum file size to avoid upload of too large files.

My problem is:

When I upload a *too large* file nothing happens, there are no Java exceptions and all seems ok, while, instead on JavaScript console I get:

Wicket.Ajax:  Cannot read Ajax response for multipart form submit: SecurityError: Blocked a frame with origin "http://localhost:9080"; from accessing a cross-origin frame.

...

wicket-ajax-jquery-debug-ver-1506594798000.js:1 Wicket.Ajax: Wicket.Ajax.Call.failure: Error while parsing response: No XML response in the IFrame document

Is there a way to have the evidence of this failure in Java code? In order to show a feedback panel when file is too large?

Best regards,
Andrea


Reply via email to