nordiauwu
11/13/2021, 7:55 PMfun main() {
val file = File("G:/test.zip")
embeddedServer(CIO, port = 8081) {
routing {
get("/file") {
call.response.header(HttpHeaders.ContentDisposition, "inline; filename=\"test.zip\"")
call.respondOutputStream {
file.inputStream().buffered().use { stream -> stream.copyTo(this.buffered()) }
}
}
}
}.start(true)
}
So what is a good way to debug it? Or maybe there is a better approach I can use?Emil Kantis
11/13/2021, 8:34 PMnordiauwu
11/13/2021, 8:36 PMAleksei Tirman [JB]
11/15/2021, 9:18 AMnordiauwu
11/16/2021, 6:38 AM