I had a long car trip on passengers seat and some time to prepare a long planned idea of helpers for the rather low level Upload component in Vaadin. The add-on is a very early stage of development, but I guess it may be useful already for many Vaadin users.
0.2 version is now available with enhancements especially to MultiFileUpload. With Safari, Chrome and FF users can now select multiple files from the OS file chooser or drag files straight form OS to “drop zone”. I hope you find it useful. Not that advanced browsers should degrade to selecting one file at the time.
The new version requires a widgetset + latest 6.5 nightly.
I just published a 0.3 version. It contains practically no other changes, but supports the latest nightly where file upload parts of the terminal where refactored.
I also spent some time on OS multiple file selection dialog fallback for IE (with flash), but couldn’t get swfupload-gwt to work properly yet. I hope to find some time to fix that part soon.
I just published 0.4 version of EasyUploads add-on. Uploading several files via MultiFileUpload component is now much sleeker on IE too. The MultiFileUpload component now supports selecting multiple files at once with ctrl or shift click. On IE and Opera (and in gecko_1_8) the add-on uses swfupload as fallback. On “real” browsers “multiple” attribute used like in previous 0.3 version (HTML5 enhancement).
I’m now waiting that somebody builds a photo management app comparable to flickr with Vaadin and EasyUploads.
i got an error when i use your add-on inside a form which will discarded.
Caused by: java.lang.NullPointerException
at org.vaadin.easyuploads.UploadField.setPropertyDataSource(UploadField.java:974)
at org.vaadin.easyuploads.UploadField.discard(UploadField.java:719)
at com.vaadin.ui.Form.discard(Form.java:384)
I hope I fixed it. If things don’t work with the latest version (0.4.2), please post me a simple test case so I can see the configuration in which you use the field.
Can the file size be checked before uploading it? If not then it would suck for the end user to wait for the upload to fail [using server side byte count mechanism as stream is received]
and then see an error message.
Good idea. Too bad old browsers like IE don’t still support this in any way. On modern browsers we should nowadays be able to read the file size (with js File API) before actually submitting the file. In multifile upload it might actually be possible for IE too as it is using a flash helper to do the magic.
I’ll put that on my todo list, but wont promise any implementations in a near future.
Hi!
I’m having a problem with the fallback flash. It seems like the file uploaded differs from the original image.
I am mostly uploading images, and I am not able to open the temporary files.
If you are using Vaadin 6.5.0, upgrade to the latest bugfix release. There was a bug that corrupted files.
If you are using the latest and greatest Vaadin, please let me know about the browser and flash version and also provide me a file that gets broken on upload. Otherwise its pretty hard to help.
"idgetset does not contain implementation for org.vaadin.easyuploads.MultiUpload. Check its @ClientWidget mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions. Unrendered UIDL:
Go to Project Properties → Project Facets and add the Vaadin facet. Under the configuration button, you probably want to disable automatically generating an application class etc.
If you only need the builder and not the rest of what is provided by the facet, making modifications on the Project Properties → Vaadin tab also automatically adds the builder if I remember correctly.
I know that this is an old thread, I will create a new one regarding my issue too, just in case.
I have been looking for this (see quoted thread below). I have a project which wouldn’t compile my widget set and therefore I couldn’t use some of the addons. I’m so glad I happened across this while browsing the forum.
However, after adding the “Vaadin Eclipse Integration” facet to my project and attempting to compile the widget set, I get the following, so there is still something I am missing:
Starting GWT compiler
Mar 30, 2011 10:17:14 AM com.vaadin.tools.WidgetsetCompiler$1 run
SEVERE: Widgetset compilation failed
java.lang.ClassNotFoundException: com.google.gwt.dev.GWTCompiler
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.vaadin.tools.WidgetsetCompiler$1.run(WidgetsetCompiler.java:81)
at java.lang.Thread.run(Thread.java:680)
Do I need to include the gwt compiler explicitly, and if so, how do I go about doing so?
If it is something else, please feel free to point me in the right direction.