Last active
August 29, 2015 14:06
-
-
Save victormejia/4ad44f1938002ef16081 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sendFile = function (el) { | |
scope.uploading = true; | |
var filename = $('#inputElement').val(), | |
fObj = el.files[0]; | |
if (f == '') { | |
return false; | |
} | |
var fPart = filename.split('\\'), | |
origFilename = fPart[fPart.length - 1]; | |
var fData = new FormData(); | |
fData.append('file_Upload', file); | |
// send image | |
var req = { | |
url: your_path, | |
method: 'POST', | |
data: fData | |
} | |
// use $.ajax | |
$.ajax(req) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment