hi all... can someone help with how do you send i...
# spring
v
hi all... can someone help with how do you send image with kotlin and spring boot...? my controller is like this:
Copy code
@PostMapping(consumes = [MediaType.MULTIPART_FORM_DATA_VALUE])
suspend fun createGame(
    @RequestPart(name = "file") file: MultipartFile,
    @RequestPart(name = "game") game: String
): GameDto {
I keep getting 415, "message": "Content type 'image/png' not supported for bodyType=org.springframework.web.multipart.MultipartFile",
r
You're showing us the receiving end. What does the sending side look like?
v
i managed to make it work without multipart by just sending base64 string.... I dont know why it did not work but could not waste time on it.... Since I was using webflux, i had to use FilePart I guess,,, not Multipart file