Sam
10/24/2023, 11:57 AMformData {
// ...
val file = File("ktor_logo.png")
append(
"image",
InputProvider(file.length()) { file.inputStream().asInput() },
Headers.build {
append(HttpHeaders.ContentType, "image/png")
append(HttpHeaders.ContentDisposition, "filename=\"ktor_logo.png\"")
}
)
},
https://stackoverflow.com/questions/73703274/ktor-oome-while-sending-large-file