Im using this code to upload images: https://github.com/NativeScript/sample-ImageUpload
When I upload the image, I received a notification of success. I am trying to read the response from the server, and also checked the task completion event:
task.on("complete", logEvent); function logEvent(e) { console.log(JSON.stringify(e)); }
and this is the result:
{"eventName":"complete","object":{"_observers":{"complete":[{}],"propertyChange":[{}]},"_session":{"_id":"image-upload"},"_id":"image-upload{1}","_description":"{ 'uploading': Test0.png }","_upload":3807297,"_totalUpload":3807297,"_status":"complete"},"response":{}}
as you can see, the answer is null. So how can I read the response from the server?
source share