{ "id": "126509", "key": "AC-2574", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2014-04-23T05:02:11.000+0000", "created": "2014-02-18T18:54:52.000+0000", "labels": [ "media" ], "versions": [], "issuelinks": [], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:41:38.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": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Testing code:\r\n{code:JavaScript} \r\nTi.Media.onpenPhotoGallery({\r\n success: function(event) {\r\n Ti.API.debug(JSON.stringify(event));\r\n }\r\n}); \r\n{code} \r\n\r\nResult JSON:\r\nbq. {\"code\":0,\"type\":\"success\",\"source\":{},\"mediaType\":\"public.image\",\"success\":true,\"media\":{}}\r\n\r\nWorks well on Android 4.4", "attachment": [], "flagged": false, "summary": "iOS7: openPhotoGallery returns empty media on success event", "creator": { "name": "maltroth", "key": "maltroth", "displayName": "Marc Andrew Landles", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "maltroth", "key": "maltroth", "displayName": "Marc Andrew Landles", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium Studio, build: 3.2.1.201402041146\r\nTitanium SDK 3.2.0\r\niOS SDK 7.0.3\r\n\r\nDevices (iOS7):\r\nTitanium Studio simulator iPhone Retina\r\niPod Touch \r\niPhone5", "comment": { "comments": [ { "id": "293781", "author": { "name": "maltroth", "key": "maltroth", "displayName": "Marc Andrew Landles", "active": true, "timeZone": "America/New_York" }, "body": "The event.media seems empty on a JSON.stringify(event.media). \r\nI found that iOS needs to write the BLOB object to a file before and after you can handle it like a file object.\r\n\r\nWorking code:\r\n{code:javascript} \r\nTi.Media.onpenPhotoGallery({\r\n success: function(event) {\r\n var tempFile = Ti.Filesystem.getFile(Ti.Filesystem.tempDirectory, 'picture.jpg');\r\n tempFile.write(event.media);\r\n\r\n // Add the use of the image file\r\n }\r\n}); \r\n{code} \r\n\r\nJSON.stringify() still shows the file has empty though ...\r\n", "updateAuthor": { "name": "maltroth", "key": "maltroth", "displayName": "Marc Andrew Landles", "active": true, "timeZone": "America/New_York" }, "created": "2014-02-19T18:11:41.000+0000", "updated": "2014-02-19T18:14:29.000+0000" }, { "id": "297492", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I am having problem running this code on both iOS and Android platforms. I will try on another device now.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-17T03:14:22.000+0000", "updated": "2014-03-17T03:14:22.000+0000" }, { "id": "297727", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "The Blob is being created with actual image Data. iOS does not send out any media url info. Hence blob has no properties.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-18T17:35:35.000+0000", "updated": "2014-03-18T17:35:35.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }