bowenliang123 commented on code in PR #4144:
URL: https://github.com/apache/kyuubi/pull/4144#discussion_r1073339218


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala:
##########
@@ -187,6 +191,29 @@ private[v1] class BatchesResource extends 
ApiRequestContext with Logging {
     buildBatch(sessionManager.getBatchSessionImpl(sessionHandle))
   }
 
+  @ApiResponse(
+    responseCode = "200",
+    content = Array(new Content(
+      mediaType = MediaType.APPLICATION_JSON,
+      schema = new Schema(implementation = classOf[Batch]))),
+    description = "create and open a batch session with uploading resource 
file")
+  @POST
+  @Path("/upload")
+  @Consumes(Array(MediaType.MULTIPART_FORM_DATA))
+  def openBatchSessionWithUpload(
+      @FormDataParam("batchRequest") batchRequestStr: String,
+      @FormDataParam("resourceFile") resourceFileInputStream: InputStream,
+      @FormDataParam("resourceFile") resourceFileMetadata: 
FormDataContentDisposition): Batch = {

Review Comment:
   No. Seems both are required, as instruction from Jerysey's doc 
here(https://eclipse-ee4j.github.io/jersey.github.io/documentation/latest/media.html#d0e9649).
   One is for getting input stream and the other for uploaded file's metadata.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org
For additional commands, e-mail: notifications-h...@kyuubi.apache.org

Reply via email to