mercredi 24 janvier 2018

How i can get and post File with thymleaf + Spring boot

How can i set the input file for the edit form with Spring Boot + thymelaf? I try to use the MultpartFile class, but i only can get its values... This is the data transfer class

public class DocumentoCommand {
    private Long id;
    private String descricao;
    private String dataEmissao;
    private MultipartFile arquivo;
    private String tipoDocumento;
}

This is the HTML

<input th:field='*{arquivo}' type="file" style="display: none;" multiple>




Aucun commentaire:

Enregistrer un commentaire