Guest User

Untitled

a guest
Mar 24th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. function subirImagen(fileURL) {
  2.  
  3. var options = new FileUploadOptions();
  4. options.fileKey = "imagen";
  5. options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1);
  6.  
  7. var ft = new FileTransfer();
  8. ft.upload(fileURL, encodeURI("http://localhost:8080/HelloSpringMVC/hello"), uploadSuccess, uploadFail, options);
  9. }
  10.  
  11. @RequestMapping("/hello")
  12. public String RecibeImagen(@RequestParam("file")MultipartFile image) {
  13.  
  14. System.out.println("Imagen recibida");
  15.  
  16. return null;
  17. }
Add Comment
Please, Sign In to add comment