Hi all.
I'm trying to upload directories using the new proposed HTML5 spec, supported by Chrome:
but it fails with:
org.apache.commons.fileupload.MultipartStream$MalformedStreamException: Stream ended unexpectedly
at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:1005)
at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:903)
at java.io.InputStream.read(InputStream.java:101)
The HTTP-request payload looks like this:
------WebKitFormBoundaryEGeYs7NXIdKP92K3
Content-Disposition: form-data; name="aaxmlrequest"
true
------WebKitFormBoundaryEGeYs7NXIdKP92K3
Content-Disposition: form-data; name="upload"; filename="tmp"
Content-Type: application/octet-stream
------WebKitFormBoundaryEGeYs7NXIdKP92K3--
When uploading a regular file the HTTP-request payload looks like this:
------WebKitFormBoundary8Q0M8sFUNiid45oB
Content-Disposition: form-data; name="aaxmlrequest"
true
------WebKitFormBoundary8Q0M8sFUNiid45oB
Content-Disposition: form-data; name="upload"; filename="brscan-skey-0.2.4-1.amd64.deb"
Content-Type: application/vnd.debian.binary-package
------WebKitFormBoundary8Q0M8sFUNiid45oB--
I'm using commons-fileupload-1.3.3.
It seems it's an apache-commons-filupload issue and not directly related to Lift. Has anyone gotten uploading directories to work with Lift? Are there other file-upload backends than apache-commons which supports this?
Thanks.
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963