Hello, Sanders
Thanks for getting back to me.
Actually I got it working using the FormData() object. Unfortunately the FormData() is not available in IE9. Now what is really causing an issue is not uploading file(s), but uploading files in IE9.
I am pretty sure it doesn't have to do with file size since I am testing with small files, and as mentioned above I am able to upload files to the server in versions higher than IE 9.
In non IE 9 browsers (Chrome, Firefox, IE >= 10) this piece of code works:
fd = new FormData(); // FormData doesn't work in IE 9
fd.append('file', file);
//call api
$http({
method: 'POST',
url: 'upload-to-this-api',
params: {
''param1': paramValue1,
},
data: data,
transformRequest: angular.identity,
headers: {
'Content-Type': undefined
}
})
.success(function(data, status){
})
.error(function(data, status){
});
Do you happen to know what can be a good replacement for the FormData() object in IE 9?
Thank you, and please let me know if you require more details.