BUG: after upload of multiple files not possible to reset the upload filelist

Dear Support

Attached you find a simple project.

There is a list of uploaded files. You can add more files by adding them with the MultiUpload Button which is working fine for one run to upload one or multiple files.

upload1

If you use the same MultiUpload Button again, the list of files is not deleted despite the fact of using

event.getSource().clearFileList();
upload.clearFileList();

The newly uploaded files are added to the list of the files already deleted in the run before. This list gets larger each upload and I would have to check each entry, if the file still is existing or might be new ;/


With the second upload button where I create each time of the upload a new MultiUploader it is working.
upload2


Hint
I found in the Jmix-UI a property uploadHandlerType, but the Studio complains you if you try to set this handler.
grafik

I think, there is a bug here

UPDATE

I did change MultiFileTemporaryStorageBuffer to MultiFileMemoryBuffer ( deprecated … ) and was then able in
public void onUploadAllFinished(final AllFinishedEvent event) {
to assign a new Buffer

MultiFileMemoryBuffer newBuffer = new MultiFileMemoryBuffer();
upload.setReceiver(newBuffer);

so, the program is finally working, otherwise there is the same bug with this implementation too.

Regards
Felix

1 Like

Hi,

Unfortunately I cannot test your project. Also, I’ve removed attached project because it seems that they contain sensitive data.

Screenshot 2026-04-13 at 12.15.42

Could you please attache a simple demo project that reproduces the issue?

The uploadhandlerType attribute isn’t exist in the 2.8, it will appear in the 3.0 version as a replacement of deprecated Vaadin API.

Regards,
Gleb

Hi Gleb

You are right, there where some sensitive data, which are luckily outdated. But I will have to check next time better, what is in the upload.zip …

As you see in the attachment, I upload the files and then I create manually entity by entity with the fileref.
Upload.zip (234.3 KB)

As it is documented in upload :: Jmix Documentation I did expect, it should work too :wink:

So the visual component upload is not supported in Jmix 2.8 ?

Regards
Felix

Hi @gorelov

Are there any plans to fix the problem with the cleanup of ?

<upload receiverType="MULTI_FILE_MEMORY_BUFFER" ...>

Regards
Felix

As Vaadin documentation states:

The Clear/Remove button doesn’t remove a successfully uploaded file from the server file system or database. It’s only removed from the file list. Remember to remove the file from the backend.

Same is applicable to the clearFileList() method.

The problem is that MultiFileReceiver doesn’t have API to clear uploaded file list. MULTI_FILE_MEMORY_BUFFER maps to Vaadin’s com.vaadin.flow.component.upload.receivers.MultiFileMemoryBuffer which we cannot “fix”. So your WA with setting a new receiver is good one.

Considering the logic of UploadProcessListView, looks like fileStorageUploadField would be more convenient. Same for the detail view.

If you’re referring to the uploadHandlerType attribute, I don’t see it described in the documentation.

It’s fully supported as it designed by Vaadin. We only provide 2 receivers and localization.

Regards,
Gleb

Thank you @gorelov for the detailled reply

I need the ability to upload multiple files at once; therefore the fileStorageUploadField is no option ;(

I found the uploadHandlerType in the Studio, perhaps it should be removed there ?
image

And perhaps a remark in the documentation, that clearFileList() does not really clear the FileList.

Regards
Felix

Created an issue.

Method does what it says, clears file list of a component. You obtain files from receiver, not from component.

Regards,
Gleb