Authentication problems with file transfer upload()


#1

I’m currently developing an upload method to upload data such as objects and image files.

I created a method to authenticate my user, When the user first logs in they are issued a token (random key). When the user goes to upload new information it will pass the token key into the url. Once the information has been uploaded it will then create a new key and pass it down. This works perfectly on iOS.

The problem i’m having is with android. The object that is passed down via the http response is as follows:

Success

bytesSent: 1786117
objectId: ""
response: "{"response":"S","result":{"image_id":7,"msg":"success"},"token":123456789abc,"auth":true}"
responseCode: 200

Failed

bytesSent: 1786117
objectId: ""
response: "{"response":"E","result":{"error":7,"msg":"User has to be authenticated"},"token":null,"auth":false}"
responseCode: 200

It’s as if no key is being passed up or some how its uploading in chunks and requiring a different token each time. I have set the chunkedMode = false within the options but made no difference.

Anyone dealt with this issue before? really stuck with this one. Please help =).