{ "id": "85055", "key": "TIMOB-7264", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "12095", "description": "", "name": "Sprint 2012-03", "archived": true, "released": true, "releaseDate": "2012-02-12" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-02-14T23:29:03.000+0000", "created": "2012-01-17T14:48:30.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_network", "parity", "qe-testadded" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2014-03-13T17:45:14.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h4. PROBLEM DESCRIPTION\r\nCustomer can't upload files thru HTTPClient from Android. Code is working perfect in iOS. \r\n\r\nh4. STEPS TO REPRODUCE\r\n1. Create mobile project\r\n2. Paste this code to app.js\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar image = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory,'appc.jpg');\r\n\t\r\nvar xhr = Titanium.Network.createHTTPClient();\r\n\r\nxhr.onerror = function(e)\r\n{\r\n\tTi.UI.createAlertDialog({title:'Error', message:e.error}).show();\r\n\tTi.API.info('IN ERROR ' + e.error);\r\n};\r\nxhr.setTimeout(20000);\r\nxhr.onload = function(e)\r\n{\r\n\tTi.UI.createAlertDialog({title:'Success', message:'status code ' + this.status}).show();\r\n\tTi.API.info('IN ONLOAD ' + this.status + ' readyState ' + this.readyState);\r\n};\r\nxhr.onsendstream = function(e)\r\n{\r\n\tTi.API.info('ONSENDSTREAM - PROGRESS: ' + e.progress);\r\n};\r\n\r\n// open the client\r\nxhr.open('POST','https://twitpic.com/api/uploadAndPost');\r\n\r\n// send the data\r\nxhr.send({media:image,username:'fgsandford1000',password:'sanford1000',message:'check me out'});\r\n\r\nwin.open();\r\n{code}\r\n\r\n3. Run this on Android\r\n\r\nh4. ACTUAL RESULTS\r\nThe upload is not working\r\n\r\nh4. EXPECTED RESULTS\r\nThe upload working fine, as in iOS. \r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: HTTPClient not working for upload files (Parity)", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": "Titanium SDK version: 1.8.0.1\r\nJavascript Engine: Rhino / V8 \r\nPlatform & version: Android 2.3 \r\nDevice Details: Android emulator \r\nHost Operating System: OSX Lion \r\nTitanium Studio version: 1.0.7", "comment": { "comments": [ { "id": "180952", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Problem was that Resource files are not real files in the file system.\r\n\r\nPull request ready\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/1291", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-01-27T16:14:58.000+0000", "updated": "2012-01-27T16:14:58.000+0000" }, { "id": "281104", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Anvil test case added.\nPR link:\nhttps://github.com/appcelerator/titanium_mobile/pull/5011", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-25T08:21:53.000+0000", "updated": "2013-11-25T08:21:53.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }