Map-From-Multipart binding¶
Support a variety of map-from-multipart bindings:
Simply decorate your request dto property (must be read and write) with the corresponding 'MapFromMultipartAttribute'.
You also need to specify the multipart section position (zero based).
File¶
public record CommandDto
{
[MapFromMultipartFile(0)]
public IFormFile File { get; set; }
[MapFromMultipartJson(1)]
public PayloadDto Payload { get; set; }
}