updated vaadin-upload and now broken because vaadin-upload uses a form

Hi,

I’ve just been trying to update vaadin-upload, because the d&d from the previous version had stopped working. I’m now attempting to get version 4.2.1 working.
Unfortunately, it seems to now use a form, while before it was just uploading it raw.
I see in this page: https://cdn.vaadin.com/vaadin-upload/2.0.0-alpha1/demo/advanced.html that there is a way to prevent it from wrapping in a form, but it seems I am using that method already, and yet it still uploads as a form - and that gets rejected by the server.

I attempted to try the demo out to see that it does actually work, but it doesn’t seem to do any network operations at all, so I guess the demo is of the UI only.
Can someone confirm that it does actually work?

Max.

OK, so I think I figured it out.

Vaadin-upload does the first upload ‘automatically’, which was fine when before it started wrapping in a form. My code allows the user to adjust various parameters like the queue length, and how many files can be uploaded simultaneously, and add files on the fly. So, when a file is added, the upload isn’t automatically added, and might simply be added to a queue - in which case I prevent the default. If it is the first file, however, the upload is started, and I don’t prevent the default. However, with this form stuff, I need to prevent the default in all circumstances, and start the first upload myself (in the same way I’ve been doing that when a download finished, to start the next one in the queue).

For some reason, I have to send file.fileBuffer too, rather than simply ‘file’ as in the example.

Anyway, all good, I guess.