Skip to content

Instantly share code, notes, and snippets.

@bitkid
Created January 21, 2020 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitkid/760dba3474632c62aaf9df118279df63 to your computer and use it in GitHub Desktop.
Save bitkid/760dba3474632c62aaf9df118279df63 to your computer and use it in GitHub Desktop.
val multipart = call.receiveMultipart()
multipart.forEachPart { part ->
if (part is PartData.FileItem) {
try {
val stream = part.streamProvider()
val params = SimpleParser.parse(stream.reader(), format.csvFormat).map {
// do stuff with the data
}
} finally {
part.dispose()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment