Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Drag and Drop Upload File later
Hi guys,
I want to upload a pdf with Drag and Drop. When I use the DragAndDropWrapper, the file is uploaded immediatly. Is there a way to invoke the upload later ? like a ClickEvent ?
Most browsers suppor dragging files on top of <input type="file">, so I guess you could use a normal upload component in non-immediate mode and some CSS to make it look like a "dropzone". The trigger the upload from a normal button click listener.
From usability POV, I'd really suggest to let the upload just start right away. It just doesn't make sense to make your users wait for the upload to happen, any more than required. If you want to save some memory, just stream it to a file and use from to server side when you actually need it.
cheers,
matti