Hi! Why are my cookies not passed to this route? `...
# ktor
w
Hi! Why are my cookies not passed to this route?
Copy code
route("api") {
            route("upload") {
                post {
                    println("RECEIVED UPLOAD!")
                    println("COOKIES: ${call.sessions}")

                    AuthorisationHandler.required(call, AuthorisationHandler.AuthorisationType.LOGGED_IN)

                    val user = call.getUser()!!

                    // handle upload
                    PostHandler.handleContentUpload(user, call.receiveMultipart())

                    // everything OK, so respond with OK
                    call.respond(HttpStatusCode.Accepted)
                }
            }
        }
The upload form is created here:
Copy code
route("/upload") {
            get {
                call.respondHtml {
                    body {
                        h1 {
                            +"Upload content"
                        }

                        Form.UPLOAD_CONTENT.createForm(this, "/api/upload", FormEncType.multipartFormData)
                    }
                }
            }
        }
Why are cookies not sent on a file upload? If I make a request to this page without an upload, cookies are set, while with an upload they are not (also not in my browser).