Upload Directory to server

I managed to convert 95% of a Java client to Vaadin successfully. Sadly I’m struggling to make importing a directory work. I tried the EasyUploads add-on and manage to make it work but due to limitations/restrictions in HTML5 is impossible to drag folders for upload. Is there any work around? I shouldn’t be the only one with this issue.

Is there an equivalent JFileChooser in Vaadin? From there I should be able to go forward.

Thanks in advance!

Hi,

Browser technology simply does not allow you to select a directory to upload.

I think the only practical solution to this is to create an applet (or a flash component) to do the selection/uploading, and wrap it in a Vaadin widget.

I’ve not done this, and I’ve not seen anyone else on the forum ask for it - but who knows, someone may have!

Cheers,

Charles.

Hello,
Is there any way to DnD folder to upload files to server in Vaadin 7 ?

As far as I know, the only browsers that support folder drop to upload all files are recent versions of WebKit based browsers (Chrome added support for this in the summer of 2013, not sure about others). On other browsers, you’d probably need to use extensions/flash/applets/… to implement this yourself or integrate a library that supports this.

I’m not certain if Vaadin would currently accept Chrome directory drops for upload - the easiest way would probably be to test it.

Thanks Henri !

In three years this has become a W3C proposal and browsers begin to have support for that:

https://wicg.github.io/directory-upload/proposal.html

I really hope Vaadin will support this!