I have searched through the group and petstore example but could not find a good Scala example to upload file.
I managed to get the button to show up on swagger UI with the following annotations:
@ApiOperation(httpMethod = "POST", consumes = "multipart/form-data")
@ApiResponses(Array(
new ApiResponse(code = 400, message = "Invalid file format")))
@ApiImplicitParams(Array(
new ApiImplicitParam(value = "Image file to attach", dataType = "file", paramType = "form")))
def uploadImage = Action.async { request =>
...
}
Unfortunately, when I inspect the data using request.body.asMultipartFormData, all the data lengths were zero.
What am I missing? Please let me know if you need more information to answer my question.
Thanks!