When I hit my imageupload endpoint, the imageFile is coming back null. Is there a centralized configuration I need to set somewhere to parse this? imageMetadata comes through just fine.
@PostMapping(value = "/images/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public String upload(
@RequestPart(value = "imageFile", required = false) MultipartFile imageFile,
@RequestPart(value = "imageMetadata", required = false) String imageMetadata
) {
String imageFileIsNull = Boolean.toString(imageFile == null);
return "Thanks for uploading your file! metadata:" + imageMetadata + " file is null: " + imageFileIsNull;
}
Return value when I attach a photo (I've tried both jpg and png)
Thanks for uploading your file! metadata: hi file is null: true