Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. ================Ini route==================
  2. Route::post('/post-product-catalog/upload','PengajuanProdukController@upload');
  3.  
  4. ================Ini controller==================
  5. $scope.upload = function ()
  6. {
  7. $("form#uploadImage").submit(function(event){
  8.  
  9. event.preventDefault();
  10. var formData = new FormData($(this)[0]);
  11.  
  12. $.ajax({
  13. url: '/supplier/post-product-catalog/upload',
  14. type: 'POST',
  15. data: formData,
  16. async: false,
  17. cache: false,
  18. contentType: false,
  19. processData: false,
  20. success: function (response) {
  21.  
  22. }
  23. });
  24.  
  25. return false;
  26. });
  27.  
  28. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement