|
Did anyone made the HTML5 multi upload control work with XPages?
Julian Buss, March 1st, 2012 12:49:45
Tags: xpages
In HTML5, you can add the "multiple" attribut to a [input type="file"] tag. WIth that attribute you can select multiple files and upload them to the server all at once, without the need for Flash.
I tried some things around this technique in Domino 8.5.3 and XPages, but without luck so far. There seems to be a problem with the XSP FileUpload code, on the Domino console I get the message com.ibm.xsp.http.fileupload.FileUploadException: Array index out of range: 1. So in the XSP backend there seems to be something hardcoded to allow only one file in the HTTP POST payload. I have some ideas to create workarounds, but they are all pretty complicated and I'm looking for a more simple solution. Did anyone played with HTML5 multi file uploads yet and succeeded? P.S. I am aware of the multi file upload control on OpenNTF, but that uses Flash, which is a no-go for my current project.
Comments (9) | Permanent Link
1) Did anyone made the HTML5 multi upload control work with XPages?
I haven't tried it, maybe this might be of help (using XHR to post files): { Link } 2) Yes.
Julian, as of last week, I have a working implementation, complete with Dijit progress bars. I'm requesting permission to open source it (it was developed for use in our Transformer Extension Library), but even if I'm not able to, I can confirm that it is possible using just the JavaScript File API, a JSON-RPC service, and the standard XPages runtime. 3) Did anyone made the HTML5 multi upload control work with XPages?
Tommy, thanks for the link. It gave me inspiration. Tim, going via JSON-RPC is a good idea, too. But at the moment, I'm on a track to another solution. Stay tuned :) 4) Did anyone made the HTML5 multi upload control work with XPages?
I believe I found a good and elegant solution and will write about it next week :-) 5) Did anyone made the HTML5 multi upload control work with XPages?
Nice.. :) If you have the time, could you mention if there are any performance difference/other advantages by using the HTML 5 file api? I would think less initial loading, since you're not loading flash. Also you are using the same HTTP session, whereas in the FileUploadControls I've tested, flash has it's own session as Anonymous, which leads to some "hacks" when it comes to access control. 6) Did anyone made the HTML5 multi upload control work with XPages?
You're right: the multi file upload control on OpenNTF uses SWFUpload which is a Flash component. I embedded another multi file upload control called PLUpload in Bildr a while back (also available on OpenNTF). It's configured to use HTML 5 based uploads in supported browsers (and if HTML5 isn't available automatically fall back to use Silverlight, Flash or eventually HTML4). I did look at the source and it appears to also be using the "XMLHttpRequest Level 2" specs in the link Tommy added. I'm curious about the solution you came up with. 7) Did anyone made the HTML5 multi upload control work with XPages?
It also has drag and drop support from the desktop in browsers that support HTML5. BTW: The current release on OpenNTF of Bildr (3.3) doesn't work in Firefox 10 due to a bug in PLUpload. I've fixed that in a newer release and will try to update it on OpenNTF. Let me know if you want it. 8) Did anyone made the HTML5 multi upload control work with XPages?
I described my solution here: { Link } 9) Did anyone made the HTML5 multi upload control work with XPages?
correction, new link: { Link } |
