Github user manuzhang commented on a diff in the pull request: https://github.com/apache/incubator-gearpump/pull/81#discussion_r77628447 --- Diff: core/src/main/scala/org/apache/gearpump/jarstore/FileDirective.scala --- @@ -67,25 +69,32 @@ object FileDirective { type FormField = Either[FileInfo, String] /** - * directive to uploadFile, it store the uploaded files - * to temporary directory, and return a Map from form field name + * Store the uploaded files to temporary directory, and return a Map from form field name * to FileInfo. */ def uploadFile: Directive1[Form] = { - uploadFileTo(null) + Directive[Tuple1[Form]] { inner => + extractMaterializer {implicit mat => + extractExecutionContext {implicit ec => + uploadFileImpl(mat, ec) { filesFuture => + ctx => { + filesFuture.map(map => inner(Tuple1(map))).flatMap(route => route(ctx)) --- End diff -- Can we improve code readability here ? It's hard to comprehend what it is doing.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---