Sep 23, 2013, 3:55 PM
11 Posts

Multiple Files Uploader with HTML5 Drag-and-Drop : help required

  • Category: Dojo and Client Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer,End User
  • Tags: XPAges
  • Replies: 2

Hi All,

I need one help for drag and drop functionality in xPage to attach multiple attachments asynchronously in domino document. 

Is it possible to implement the same by using HTML5 in xPage? 

Something like below shown link:


Thanks in advance.



Sep 24, 2013, 2:26 PM
261 Posts
Yes, that's possible


Yes, it's possible. I would suggest using one of the uploaders like the one from YUI (don't have any experience with that), PLUpload or jQuery File Uploader. You then need to create an XPage that you send the files too from the clientside library and process them on the server. This answer on StackOverflow should also point you in the right direction:

I also have a project on OpenNTF that shows how you can do multiple file uplads with XPages:

(I wouldn't recommend that one anymore since it uses Flash, but maybe you can grab some ideas from it).

Another example I did is the (HTML5) image uploader (including drag-n-drop) in Bildr. Also available on OpenNTF.


Oct 4, 2013, 6:03 AM
11 Posts
Multiple Files Uploader with HTML5 Drag-and-Drop

Thanks Mark,

I tried your OpenNtf database, I just customized your multiple image uploader xpage to fit in my requirement.

I have draged'n'dropped a file on the div having id 'imagesQueue'. I have the file object in javascript. Please see below code which I have added to add files in Queue.

I have modified Div as below:

<div class="fieldset rows" id="imagesQueue" ondrop="drop(event)"


Javascript Code for Drag and drop:

function allowDrop(ev)
function drop(ev)
var FileList = ev.dataTransfer.files; 
 for (var i = 0, f; f = FileList[i]; i++)
if (f.type!="")


After this its showing files inside the div having id 'imagesQueue'..

But problem is that when I clicks on the Start All uploads button it only processes files which are not selected by using Drag and drop.

Please let me know if I am making any mistakes in adding files in the Queue.


Thanks and regards,