File Upload - Jmix 2.0

Hi,

I had created file upload in jmix 1.0 by using below code but the same id is not getting fetch in Jmix 2.0


@Subscribe("saveAndCloseButton")
    public void onSaveAndCloseButtonClick(Button.ClickEvent event) {
File file = temporaryStorage.getFile(Objects.requireNonNull(fileUploader.getFileId()));
}

But in JMIX 2.0 i am not getting UUID for getId so unable set FileInputStream inputStream = new FileInputStream(file);

getting Required type:UUID

Hi

for dialogs event handlers are used in 2.x

    @Subscribe("importField")
    public void onImportFieldFileUploadSucceeded(final FileUploadSucceededEvent<FileUploadField> event) {
        if (importField.getValue() != null) {
               // process data
        }
    }

https://demo.jmix.io/ui-samples/sample/file-upload-field