I need to upload a file with spring boot, actually this file it's included in a dto which itself included into another one. When I try to test into swagger I don't have a bar to upload the file, it's look like I had to write the file path instead of uploading it. I have the warrantyRequestNormalCreationDto which had a list of WarrantyRequestNormalPartsCreationDto which each item have a MultiparFile when I try to save it either I don't have a bar to select the files for each item (photo).
public class WarrantyRequestNormalCreationDto extends WarrantyRequestNormalDetailsDto {
private String reparationPictureFileName;
@EqualsAndHashCode.Exclude
private MultipartFile reparationPictureFile;
private String workOrderFileName;
@EqualsAndHashCode.Exclude
private MultipartFile workOrderFile;
private List<@Valid WarrantyRequestNormalPartsCreationDto> warrantyRequestNormalParts;
}
public class WarrantyRequestNormalPartsCreationDto implements Serializable {
private Integer id;
@NotBlank
private String constructorSerialNumber;
@NotNull
@DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate manufactureDate;
private float failureQuantity;
@NotNull
private FailureCodeEnum failureCode;
@NotBlank
private String ArticleCode;
@NotBlank
private String numberplateFileName;
@EqualsAndHashCode.Exclude
private MultipartFile numberplateFile;
private Integer warrantyRequestNumber;
}
a way to have a bar to uplaod the file.