I've trouble finding a way to end processing. I'm ...
# ktor
m
I've trouble finding a way to end processing. I'm using a
post()
handler, go through all the multiparts and if I find a
FileItem
, I store it, send a redirect and want to be done. Of course, if there's none, I want to redirect back to the main site. But my code always runs into the second redirect (in addition to the first one).
c
How do you send redirect? do you use
call.respondRedirect()
?
m
Yes. I guess my trouble was related to the "file processing" part, which happens in a co-routine. I refactored to grab all parts, then filter and redirect as appropriate.