Alex Styl
12/30/2021, 12:08 PMAlex Styl
12/30/2021, 2:32 PMval contentLength = call.request.headers["Content-Length"]?.toLong()
if (contentLength == null) {
call.respond(HttpStatusCode.LengthRequired)
} else if (contentLength > MAX_SIZE) {
call.respond(HttpStatusCode.PayloadTooLarge)
}
works alright for my needs. Currently there is only one post request that accepts files so I am only doing it there.