[
https://issues.apache.org/jira/browse/GEARPUMP-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15467351#comment-15467351
]
ASF GitHub Bot commented on GEARPUMP-205:
-----------------------------------------
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.
> remove hdfs dependency from command gear's classpath
> ----------------------------------------------------
>
> Key: GEARPUMP-205
> URL: https://issues.apache.org/jira/browse/GEARPUMP-205
> Project: Apache Gearpump
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.8.2
> Reporter: Huafeng Wang
> Assignee: Huafeng Wang
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)