I am creating an application with Phonegap from which I send an image to a Spring MVC controller, this is my shipping code
function subirImagen(fileURL) {
var options = new FileUploadOptions();
options.fileKey = "imagen";
options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
var ft = new FileTransfer();
ft.upload(fileURL, encodeURI("http://localhost:8080/HelloSpringMVC/hello"), uploadSuccess, uploadFail, options);
}
My problem is to receive it, I had a test done to receive Strings, but I am new to this and I do not find anything clear to receive images using Spring MVC, I have this code
@RequestMapping("/hello")
public String RecibeImagen(@RequestParam("file")MultipartFile image) {
System.out.println("Imagen recibida");
return null;
}