Hello, I am currently working for Android App. Part of the requirement is I need to transfer some 15 photos at a time.
I am using below code. Some how, my code never return success or failure. It always in pending state. If i try uploading single file everything works fine. Can some one help me with this? (I tried even with $http.post. it is same result)
Do you think I should use $cordovaFile.fileUpload()?
var fd = new FormData();
fd.append('file', blob, 'icon.jpg');
fd.append('data', JSON.stringify(request));
$.ajax({
type: 'POST',
url: url,
data: fd,
dataType: 'json',
contentType: false,
cache: false,
processData: false
})
.done(function (result) {
deferred.resolve(result);
})
.fail(function (jqXHR, status, err) {
deferred.reject({ data: err, status: status });
});