{ "id": "132449", "key": "TIMOB-17253", "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": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" }, { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-07-07T17:59:46.000+0000", "created": "2014-07-01T09:42:07.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "module_acs", "qe-3.3.0", "qe-testadded", "regression" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [ { "id": "38786", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "132451", "key": "TIMOB-17254", "fields": { "summary": "iOS: Cloud.Photos.update function is not working for photos from camera or gallery", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-07-07T18:58:30.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": "13617", "name": "Cloud", "description": "Cloud/CloudPush and related items" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "When a image blob from a camera or gallery is uploaded on the ACS, it always has the same filename as \"file0.\" and also the file extension is missing.\r\n\r\nThe issue is a regression and it did not occur on 3.2.3.GA.\r\n\r\nAlso the issue does not occur on Android. On iOS, if the photo to be uploaded is assigned through an image file instead of a blob from camera or gallery then it works fine.\r\n\r\nSteps to Reproduce:\r\n1. Create a default titanium classic app\r\n2. Copy the app.js and windows folder from \"~/Library/Application Support/Titanium/modules/commonjs/ti.cloud/3.2.3/example\" into the Resources directory of the project.\r\n3. Install and launch app on iOS device\r\n4. Create a user from Users > Create User\r\n5. Press back button twice and go to Photos > Create Photo\r\n6. Press \"Select Photo from Gallery\" or \"Take Photo with Camera\" to select/take a photo and use it\r\n7. Press Create button. The photo gets uploaded to the cloud and \"Uploaded\" alert is shown\r\n8. Next go to Dashboard and check the photos object saved in the cloud for your project\r\n\r\nActual Result:\r\nThe photo object is created with filename \"file0.\". Every new photo from camera or gallery that is uploaded to the cloud has the same filename. And also it does not have a file extension.\r\n\r\nIf in the project file at \"Resources > Windows > Photos > create.js\", the line 147\r\n{code}\r\nphoto: photo,\r\n{code}\r\nis replaced with\r\n{code}\r\nphoto: Titanium.Filesystem.getFile('photo.jpg')\r\n{code}\r\ni.e. we assign the photo parameter of the photo create with a file instead of the blob from Camera or Gallery, then the issue does not occur and the new photo object in cloud is saved with the filename \"photo.jpg\"", "attachment": [], "flagged": false, "summary": "iOS: Filename of a photo blob uploaded to ACS has no file extension and always has the same name", "creator": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OSX: 10.9.2\r\nAppC Studio: 3.3.0.201406271159\r\nSDK: 3.3.0.v20140627142513\r\nCLI: 3.3.0-rc4\r\nAlloy: 1.4.0-rc3\r\nACS: 1.0.14\r\nti.cloud: 3.2.3\r\nDevices: iPhone4(v7.1), iPhone5S(v7.1)", "closedSprints": [ { "id": 133, "state": "closed", "name": "2014 Sprint 13 SDK", "startDate": "2014-06-23T21:55:20.791Z", "endDate": "2014-07-04T00:00:00.000Z", "completeDate": "2014-07-07T17:32:18.561Z", "originBoardId": 100 }, { "id": 149, "state": "closed", "name": "2014 Sprint 14 SDK", "startDate": "2014-07-07T21:48:52.340Z", "endDate": "2014-07-19T00:00:00.000Z", "completeDate": "2014-07-21T15:58:32.928Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "312299", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR for master: https://github.com/appcelerator/titanium_mobile/pull/5885\r\nPR for 3.3.x: https://github.com/appcelerator/titanium_mobile/pull/5886\r\n\r\nSample code:\r\n{code}\r\nfunction choosePhoto(_params){\r\n\tvar opts = ['Photo Gallery', 'Camera'];\r\n\tif(_params.extraButton) {\r\n\t\topts.push(_params.extraButton);\r\n\t}\r\n\topts.push('Cancel');\r\n\tvar options = Ti.UI.createOptionDialog({\r\n\t\ttitle: _params.title,\r\n\t\toptions: opts,\r\n\t\tcancel: _params.extraButton == undefined ? 2 : 3\r\n\t});\r\n\toptions.addEventListener('click', function(e) {\r\n\t\tif(_params.extraButton != undefined && e.index == 2) {\r\n\t\t\t_params.onExtraButton();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar params = {\r\n\t\t\tallowEditing: _params.square,\r\n\t\t\tsuccess: _params.onSuccess\r\n\t\t};\r\n\t\tswitch(e.index) {\r\n\t\t\tcase 0:\r\n\t\t\t\tTi.Media.openPhotoGallery(params);\r\n\t\t\treturn;\t\r\n\t\t\tcase 1:\r\n\t\t\t\tTi.Media.showCamera(params);\r\n\t\t\treturn;\t\r\n\t\t}\r\n\t});\r\n\toptions.show();\r\n};\r\n\t\tvar Cloud = require('ti.cloud');\r\n\r\n(function() {\r\n\tvar win = Ti.UI.createWindow({\r\n\t\tbackgroundColor: 'white'\r\n\t});\r\n\tvar navWindow = Ti.UI.iOS.createNavigationWindow({\r\n\t\twindow: win\r\n\t});\r\n\tvar btn = Ti.UI.createButton({\r\n\t\ttitle:'here',\r\n\t\tenabled: false\r\n\t});\r\n\tbtn.addEventListener('click', function(){\r\n\t\tchoosePhoto({\r\n\t\t\tonSuccess: function(e) {\r\n\t\t\t\tCloud.Photos.create({\r\n\t\t\t\t\tphoto: e.media\r\n\t\t\t\t}, function(e){\r\n\t\t\t\t\tTi.API.info(e);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t})\r\n\t})\r\n\twin.add(btn);\r\n\tCloud.Users.login({\r\n\t\tlogin: 'pec1985',\r\n\t\tpassword: 'pec1985'\r\n\t}, function(e){\r\n\t\tif(e.success) {\r\n\t\t\tbtn.enabled = true;\r\n\t\t} else {\r\n\t\t\talert(e.message);\r\n\t\t}\r\n\t});\r\n\tnavWindow.open();\r\n})();\r\n{code}", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-07-03T19:42:35.000+0000", "updated": "2014-07-03T19:42:35.000+0000" }, { "id": "312636", "author": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed on:\r\nMac OSX 10.9.4\r\nAppcelerator Studio, build: 3.3.0.201407031747\r\nTitanium SDK, build: 3.3.0.v20140707105712\r\nTitanium CLI, build: 3.3.0-rc4\r\nAlloy: 1.4.0-rc4\r\niOS Device: iPhone 5 (7.0.6)\r\n\r\nFollowed test steps provided in the description as well as test code provided by [~penrique].\r\nPhoto is successfully uploaded to Dashboard with the correct file extension.\r\nClosing.", "updateAuthor": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-07T18:58:16.000+0000", "updated": "2014-07-07T18:58:16.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }