-
Bug
-
Resolution: Fixed
-
Normal
-
8.0.1.1
-
Security Level: Jimmy
-
None
-
ZK 8.0.3 S1
-
None
the attached example shows a page 2 upload components
- button upload
- drop upload
When uploading the same files the results are not consistent, and an NPE occurs with a dropupload when the filesize is is almost or equal the maxsize (withing a few hundred bytes)
I attached 4 test files to illustrate the differences.
512bytes.txt
-> both OK upload successful
2048bytes.txt
both show an error message -> OK (a bit inconsistent but already raised as ZK-3086)
896bytes.txt
button upload -> rejected (counting request size not file size, expected according to the current implementation setSizeMax vs setFileSizeMax)
-> Exception in console -> OK
org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (1082) exceeds the configured maximum (1024)
-> shows error popup -> OK
drop upload -> same console error
org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (1082) exceeds the configured maximum (1024)
-> NO error popup -> fires onUpload event leading to an NPE (when trying to access the media object)
ERROR UiEngineImpl:1481 -
java.lang.NullPointerException: Null Pointer while evaluating: event.media.name
at bsh.Name.consumeNextObjectField(Name.java:353)
at bsh.Name.toObject(Name.java:196)
at bsh.BSHAmbiguousName.toObject(BSHAmbiguousName.java:54)
...
the same happens with 1024bytes.txt file... above that all files are rejected with an error message
besides: it is confusing that both components with basically the same task "uploading files" behave differently (DropUpload performing a client side check, checking for correct file sizes, and ignoring any later server side exceptions, while button upload only checks on the server side, using the request size, which is of course more performant since it only relies on the request headers)
this could be aligned, that both components perform the same client and server side checks, resulting in equal error messages which both are customizable (again refer to ZK-3086)
- relates to
-
ZK-3086 Users can customize file size exceeding message for Dropupload
- Closed