Upload multiples files in a single rest request

Hi, everybody,

I need to receive files from a app, this app send me some images and some text fields in a single “multipart/form-data” request. When the server receive this request is necessary make some validations before save the images.

I did try to do this using cuba Rest API FileUploadController, but this feature only receive a file and the name of this file. I couldn’t save multiples files in one request and neither read the others values of the request.

So, i did try create a service method that receives a MultipartFile in the parameters, but this approach did not work too. When i send the request the Cuba gives me a internal erro saying that couldn’t find my method without parameters, so i think when the cuba receives my request, he pass to my service without parameters.

Someone can tell me a way to achieve this?

I resolved this using a Custom Controller.