Hello!
The documentation you follow is not for Flow UI. The Flow UI documentation is under development stage.
For now, Flow UI does not contain fields for uploading files. But you can use Upload
Vaadin component from the controller, e.g. (Jmix 1.4 release candidate - #12 by krivopustov):
@ViewComponent
private FormLayout form;
@Autowired
private FileStorage fileStorage;
@Subscribe
public void onInit(InitEvent event) {
MemoryBuffer memoryBuffer = new MemoryBuffer();
Upload upload = new Upload(memoryBuffer);
upload.setMaxFiles(1);
upload.addFinishedListener(event1 -> {
FileRef fileRef = fileStorage.saveStream(memoryBuffer.getFileName(), memoryBuffer.getInputStream());
getEditedEntity().setPicture(fileRef);
updateImage();
});
form.add(upload);
}