Hello, is there a example how to handle a employee form with a image and store it in database or directory?
Not exactly an employee, is a single example, the use case is a form with upload at the same time, how does the Bean handle the multipart part?
If you’re only uploading an image, the way to do that is to create a spring rest controller to handle that. But I don’t have a good answer for how to do it within a form submission with other data. I asked the team.
It’s definitely something we should have an answer for
This documentation article shows one way of doing it Image Fields in Forms | Forms | Guides | Lit | Hilla Docs
If you must accept large files and Base64 is a problem for you, it would be better to use the https://vaadin.com/docs/latest/components/upload component to upload files properly and get a reference to them, that you’ll put in the form submission, separately. A bit of server cleanup will be necessary of course.
Thanks so much