{ "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\nThe problem is on line 668 in TiHTTPClient.java:
\r\nFile tmpFile = File.createTempFile(\"tixhr\", TiMimeTypeHelper.getFileExtensionFromMimeType(mimeType, \".txt\"));
\r\n
\r\nBecause\r\nTiMimeTypeHelper.getFileExtensionFromMimeType(mimeType,default)\r\nreturns the extension without \".\", it has to be added, like\r\nthis:
\r\nFile tmpFile = File.createTempFile(\"tixhr\", \".\"+TiMimeTypeHelper.getFileExtensionFromMimeType(mimeType, \"txt\"));
\r\n