{ "id": "62668", "key": "TIMOB-2036", "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": "11358", "description": "Mobile 1.8.0 M05", "name": "Sprint 2011-26", "archived": true, "released": true, "releaseDate": "2011-07-04" } ], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2011-07-11T10:14:29.000+0000", "created": "2011-04-15T03:08:44.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "extension", "httpclient", "mimetype" ], "versions": [ { "id": "11367", "description": "", "name": "Release 1.7.1", "archived": true, "released": true, "releaseDate": "2011-06-21" } ], "issuelinks": [ { "id": "11620", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "76989", "key": "TIMOB-4519", "fields": { "summary": "Android: filename generated when pulling image from gallery to send via http request does not have a dot before extension", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-07-11T10:28:41.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": "{html}

If you send a blob (image from photogallery for instance) with\r\nTitanium.Network.HTTPClient POST, the extension of the file is not\r\nset properly. Missing an \".\".

\r\n

The problem is on line 668 in TiHTTPClient.java:

\r\n
\r\nFile tmpFile = File.createTempFile(\"tixhr\", TiMimeTypeHelper.getFileExtensionFromMimeType(mimeType, \".txt\"));\r\n
\r\n

Because\r\nTiMimeTypeHelper.getFileExtensionFromMimeType(mimeType,default)\r\nreturns the extension without \".\", it has to be added, like\r\nthis:

\r\n
\r\nFile tmpFile = File.createTempFile(\"tixhr\", \".\"+TiMimeTypeHelper.getFileExtensionFromMimeType(mimeType, \"txt\"));\r\n
{html}", "attachment": [], "flagged": false, "summary": "Sending blob with Titanium.Network.HTTPClient POST sends file without extension", "creator": { "name": "cfenzo", "key": "cfenzo", "displayName": "cfenzo", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "cfenzo", "key": "cfenzo", "displayName": "cfenzo", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "133344", "author": { "name": "jasonsznol", "key": "jasonsznol", "displayName": "Jason Sznol", "active": true, "timeZone": "America/New_York" }, "body": "This is a huge issue for our application and is preventing our webservers from handling the photos we upload to it properly. This is such a simple fix, is there anyway we can get this in one of the CI builds so we can build against it?", "updateAuthor": { "name": "jasonsznol", "key": "jasonsznol", "displayName": "Jason Sznol", "active": true, "timeZone": "America/New_York" }, "created": "2011-05-10T07:52:21.000+0000", "updated": "2011-05-10T07:52:21.000+0000" }, { "id": "159185", "author": { "name": "kclark", "key": "kclark", "displayName": "Kincy Clark", "active": true, "timeZone": "America/Los_Angeles" }, "body": "this was a duplicate of 4519. However, THomas would like to verify this specific case.", "updateAuthor": { "name": "kclark", "key": "kclark", "displayName": "Kincy Clark", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-11T10:14:29.000+0000", "updated": "2011-07-11T10:14:29.000+0000" }, { "id": "159189", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with test file from 4519 with Nexus S 2.3.4 and Nexus One 2.2.2 with 1.7.2.v20110630161836\n", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-11T10:28:41.000+0000", "updated": "2011-07-11T10:28:41.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }