{ "id": "170553", "key": "TIMOB-25589", "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": "2017-12-06T14:46:34.000+0000", "priority": null, "labels": [ "windows10" ], "versions": [ { "id": "19906", "description": "", "name": "Release 6.3.0", "archived": false, "released": true, "releaseDate": "2017-11-01" } ], "issuelinks": [], "assignee": null, "updated": "2019-06-26T18:07:31.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": [], "description": "Hi,\r\n\r\nI really need you guys help.I am having a difficulty to attach image file on windows 10 App using SDK 6.3.0 GA. Application crashes whenever I try to attach an image from gallery. below is the chunk of code that I am using..\r\n\r\nvar SaveFileFromGallery = function(event)\r\n {\r\n try\r\n {\r\n imageOrVideo =0;\r\n var cropRect = event.cropRect;\r\n var image = event.media;\r\n var mime_type = image.mimeType; \r\n \r\n \r\n var SaveFile = function(e)\r\n {\r\n var f = Titanium.Filesystem.getFile(cDirTemp,fileName);\r\n f.write(image);\r\n Ti.API.info(\"before save\");\r\n imageView.image = f; //this line makes application crash\r\n Ti.API.info(\"after save\");\r\n bDraft = true;\r\n Ti.API.info(\"SaveFile fileexist\" + f.exists());\r\n \r\n };\r\n setTimeout(SaveFile,500);\r\n }\r\n catch(ex)\r\n {\r\n alert(\"Error:\" + ex.message);\r\n }\r\n \r\n \r\n };\r\n\r\nvar GetGallaryPhoto = function(e)\r\n {\r\n Titanium.Media.openPhotoGallery({mediaTypes:[Ti.Media.MEDIA_TYPE_PHOTO], success:function(events){SaveFileFromGallery(events);}, allowEditing:true});\r\n\r\n };\r\n", "attachment": [ { "id": "63742", "filename": "AddAttachments.js", "author": { "name": "alka.gurung", "key": "alka.gurung", "displayName": "alka.gurung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-07T15:25:20.000+0000", "size": 3864, "mimeType": "application/javascript" } ], "flagged": false, "summary": "Not able to attach image in windows 10 app (SDK 6.3.0 GA)", "creator": { "name": "alka.gurung", "key": "alka.gurung", "displayName": "alka.gurung", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "alka.gurung", "key": "alka.gurung", "displayName": "alka.gurung", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "431808", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Please share a full reproducible code that can be copied into a project and be tested or compile a sample app and send the file in here. We will test and verify the issue. After that, we can move on fixing. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-12-06T20:06:52.000+0000", "updated": "2017-12-06T20:06:52.000+0000" }, { "id": "431846", "author": { "name": "alka.gurung", "key": "alka.gurung", "displayName": "alka.gurung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Sharif,\r\n\r\nI have attached a js file that I have used to test this functionality. When I select image from Gallery and tried to put selected image in imageview,\r\nit crashes the application.\r\nMy requirement is \r\n1. select image from gallery \r\n2. Show it in imageview. Copy it to the temp folder \r\n3. After pressing save button, copy that image to the real path.\r\n\r\nimageView.image = f; //This line makes application crash\r\n\r\n\r\nHope to hear from you.\r\n\r\n\r\nThanks\r\nAlka\r\n\r\n", "updateAuthor": { "name": "alka.gurung", "key": "alka.gurung", "displayName": "alka.gurung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-07T15:31:53.000+0000", "updated": "2017-12-07T15:31:53.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }