Hey Everyone,
I cant get my Image Upload to work on IOS. It works fine on android but Ios is causing problems.
Here is my code:
var server = URLS.INDEX + 'items';
var options = {
fileKey: 'itemPic',
params: newItemData,
chunkedMode : false,
headers: {
'x-access-token': authService.getApiToken(),
Connection: "close"
}
};
$cordovaFileTransfer.upload(server, filePath, options)
.then(function (result) {
postNewItemPromise.resolve();
$state.go('slider.me', {}, {
reload: true
}).then(function () {
$rootScope.$broadcast('newItemAdded');
});
}, function (err) {
postNewItemPromise.reject();
if (err.status === 401) {
authService.reAuth();
}
}, function (progress) {
});
I get an errorcode 3. I found many posts about similar problems but they all fixed ist with Connection : “close” and chunkedMode : false. That is not working for me though. Is there a way to look at the request that fileupload sends on ios?