Question about the multipart form data server docs...
# ktor
a
Question about the multipart form data server docs https://ktor.io/docs/server-requests.html#form_data Isn't it strange that
var fileDescription
and
var fileName
are outside of the
post("/upload") { }
block? What if the form has multiple uploads? Or if the endpoint is called twice simultaneously - one request could overwrite the value from another?
k
The examples in the docs are lightweight and not production-ready — they just show the basic idea. In a real app, you'd definitely want to move those variable scopes.
a
I agree that it's confusing, so I've filed an issue.
thank you color 1