{ "id": "91247", "key": "TIMOB-8969", "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": [], "resolution": null, "resolutiondate": null, "created": "2012-05-02T18:42:27.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "RTN", "api", "supportTeam" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15856", "description": "Release 3.2.1", "name": "Release 3.2.1", "archived": false, "released": true, "releaseDate": "2014-02-10" } ], "issuelinks": [], "assignee": null, "updated": "2020-01-09T22:08:43.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "The TIBlob passed to Titanium.Media.openPhotoGallery.success is then passed to an application level event. The issue is that the TIBlob is null when the application level event is received.\r\nh4. Repro Steps\r\n1. Run the below code in the app.js\r\n2. Click the Gallery button and select an image from the phone gallery.\r\n\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win = Ti.UI.createWindow({title: 'Camera Test', exitOnClose: true, fullscreen: true, backgroundColor: '#ffffff'});\r\n\r\nvar bt = Ti.UI.createButton({'title': 'Gallery', top: 10, width: 200, height: 50});\r\nbt.addEventListener('click', function(e) {\r\n Titanium.Media.openPhotoGallery({\r\n success:function(event) { \r\n if(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {\r\n alert(event.media);\r\n Ti.App.fireEvent('uploadImage', {image: event.media, source: 'gallery'});\r\n }else {\r\n alert('Image was not uploaded because the type was invalid.');\r\n }\r\n },\r\n cancel:function() {\r\n },\r\n error:function(err) {\r\n alert('Error selecting image from gallery: ' + err);\r\n Ti.API.error(err);\r\n },\r\n allowEditing: false,\r\n autohide: true,\r\n mediaTypes:[Ti.Media.MEDIA_TYPE_PHOTO]\r\n });\r\n});\r\n\r\nTi.App.addEventListener('uploadImage', function(e) {\r\n alert(e.image);\r\n alert(e.source);\r\n});\r\n\r\nwin.add(bt);\r\nwin.open();\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: TIBlob passed to application level event disappears", "creator": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 5.1\r\nTi SDK 2.0.1.GA2\r\niPhone4", "comment": { "comments": [ { "id": "247740", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces \n\nTested with\n\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0 \nTitanium SDK version: 3.0.2 \niOS iPhone Simulator: iOS SDK version: 6.0\n", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-16T12:37:17.000+0000", "updated": "2013-04-16T12:37:17.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }