I'm trying to add file uploading handling in play framework app to existing form with text field.
According to documentation, I need to use
asMultipartFormData()
asRaw
Yes, it is possible, just simply handle file and text input separately. For instance:
public Result myControllerMethod(){
...
//handle input text here
Form<MyModel> myForm = formFactory.form(MyModel.class);
MyModel myModel = myForm.bindFromRequest().get();
...
//handle file
MultipartFormData<File> body = request().body().asMultipartFormData();
...
}