vaadin / vaadin-core

Home Page:https://vaadin.com/docs/latest/ds/overview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File Upload

andrea-tomassi opened this issue · comments

I'm successfully using the com.vaadin.flow.component.upload.Upload component in
vaadin.version>11.0.1</vaadin.version>

I set upload.setAutoUpload(true) and upload.addSucceededListener() is correctly invoked at the end of the upload.

If I move to <vaadin.version>11.0.2</vaadin.version> the upload stop to work.
After the version update, the addSucceededListener method is never called anymore.

If I downgrade to 11.0.1 the upload component works well.

Example code:

Upload upload = new Upload(new MemoryBuffer());
upload.setAutoUpload(true);
upload.addSucceededListener(event -> {
			System.out.println("SUCCEEDED Uploading --> " + event.getMIMEType() + " [" + event.getFileName() + "]");
			this.fileName = event.getFileName();
			headerUploadWrapperDiv.add(new Label("file: " + fileName  + " uploaded."));
		});
headerUploadWrapperDiv.add(upload);