i can't get call.request.queryParameters[Users....
# ktor
b
i can't get call.request.queryParameters[Users.name1.name] ???
d
call.request.queryParameters
refer to GET parameters in the URL. You won’t be able to use it if your form has
method="POST"
, only if it is
method="GET"
. The multipart reading is part of the body of the response. The multipart reading functionality is like it is so the reading happens just once without having to use too much memory. Your question is about why
call.request.queryParameters
doesn’t it work for POST? Or is it a suggestion for it to work?
b
i have a form with 3 pictures, how can i get them on my controller ? @Deactivated User
d
inside the receiveMultipart code, there is a is PartData.FileItem`, there you can check the
part.name
and put them in a hashmap or process them directly in that code
👍 1
b
@Deactivated User why do i have Exception when i call (val multipart = call.receiveMultipart() val params = call.receiveParameters()), but don't get error when i call just one of them
d
You can call only one of them, not both. It is a stream. Once one of those methods consume the body stream, the other would try to consume an empty one