{ "id": "167568", "key": "TIMOB-24678", "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": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2018-07-26T14:55:49.000+0000", "created": "2017-05-11T06:38:27.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "HTTPClient", "photogallery" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-07-26T14:55:49.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h6.Description\r\nThe photo is not uploaded to the server if the data size is bit high. I have attached four photos, among them only first photo(37k) is uploaded to the server and rest of the photo call onerror function. But on android, all the photo is uploaded successfully.\r\n\r\nh6.Steps to Reproduce\r\n1. Create a new App\r\n2. Run the following code to the device\r\n\r\n{code:title=app.js}\r\n\r\n\r\n var win = Ti.UI.createWindow({\r\n backgroundColor: 'Green',\r\n layout: \"vertical\"\r\n\r\n });\r\n\r\n\r\n // Create a Button.\r\n var Gallery = Ti.UI.createButton({\r\n title: 'Opne Gallery',\r\n height: Ti.UI.SIZE,\r\n width: Ti.UI.SIZE,\r\n top: 50,\r\n\r\n });\r\n\r\n win.add(Gallery);\r\n\r\n var ind = Titanium.UI.createProgressBar({\r\n width: 200,\r\n height: 50,\r\n min: 0,\r\n max: 1,\r\n value: 0,\r\n // style: Titanium.UI.ios.ProgressBarStyle.PLAIN,\r\n top: 20,\r\n message: 'Uploading image',\r\n font: { fontSize: 12, fontWeight: 'bold' },\r\n color: '#888'\r\n });\r\n\r\n win.add(ind);\r\n\r\n\r\n Gallery.addEventListener('click', function(e) {\r\n\r\n Titanium.Media.openPhotoGallery({\r\n success: function(event) {\r\n //upload(event);\r\n ind.show();\r\n var xhr = Titanium.Network.createHTTPClient();\r\n xhr.onload = function(e) {\r\n Ti.UI.createAlertDialog({\r\n title: 'Success',\r\n message: 'status code ' + this.status\r\n }).show();\r\n };\r\n\r\n xhr.onerror = function(e) {\r\n Ti.API.info('post,E.ERROR:' + e.error);\r\n alert('post,E.ERROR:' + e.error);\r\n };\r\n xhr.onsendstream = function(e) {\r\n ind.value = e.progress;\r\n Ti.API.info('ONSENDSTREAM - PROGRESS: ' + e.progress);\r\n\r\n };\r\n\r\n xhr.open(\"POST\", \"https://mobile.cycu.edu.tw/api/sos/panic/\");\r\n\r\n xhr.send({\r\n \"app_id\": '3',\r\n \"app_token\": 'BEDF0C6702',\r\n \"access_id\": '181',\r\n \"access_token\": '181',\r\n \"coord\": '',\r\n \"file\": event.media\r\n });\r\n\r\n\r\n },\r\n cancel: function() {\r\n // called when user cancels taking a picture\r\n // alert(\"cancel\");\r\n },\r\n error: function(error) {\r\n // called when there's an error\r\n alert(\"error: \" + error);\r\n },\r\n saveToPhotoGallery: false,\r\n animated: true,\r\n //overlay: true,\r\n // allowEditing and mediaTypes are iOS-only settings\r\n // allowEditing : false,\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO] // Ti.Media.MEDIA_TYPE_VIDEO,\r\n });\r\n\r\n });\r\n\r\nwin.open();\r\n{code}\r\n\r\n\r\nThanks", "attachment": [ { "id": "62216", "filename": "37K.png", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-05-11T06:07:10.000+0000", "size": 36092, "mimeType": "image/png" }, { "id": "62213", "filename": "4.2M.png", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-05-11T06:08:13.000+0000", "size": 4235994, "mimeType": "image/png" }, { "id": "62215", "filename": "577K.png", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-05-11T06:07:22.000+0000", "size": 578066, "mimeType": "image/png" }, { "id": "62214", "filename": "8.4M.png", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-05-11T06:09:50.000+0000", "size": 8416840, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Only small size photo is uploaded to the server using HTTPClient.", "creator": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "environment": "Titanium SDK\r\n SDK Version = 6.0.4.GA\r\n Target Platform = iphone v10.3.1\r\n\r\nNode.js\r\n Node.js Version = 4.6.2\r\n npm Version = 2.15.11\r\n\r\nTitanium CLI\r\n CLI Version = 5.0.12\r\n\r\n", "closedSprints": [ { "id": 1053, "state": "closed", "name": "2018 Sprint 15 SDK", "startDate": "2018-07-15T21:52:05.453Z", "endDate": "2018-07-29T21:52:00.000Z", "completeDate": "2018-07-29T22:25:11.723Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "419546", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I am unable to reproduce this with any other endpoint. Here is an example of using {{httpbin}}, the leading HTTP-testing service:\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'Green',\r\n layout: \"vertical\"\r\n\r\n});\r\n\r\nvar Gallery = Ti.UI.createButton({\r\n title: 'Open Gallery',\r\n top: 50\r\n});\r\n\r\nwin.add(Gallery);\r\n\r\nvar ind = Titanium.UI.createProgressBar({\r\n width: 200,\r\n min: 0,\r\n max: 1,\r\n value: 0,\r\n top: 20,\r\n message: 'Uploading image',\r\n});\r\n\r\nwin.add(ind);\r\n\r\nGallery.addEventListener('click', function(e) {\r\n Ti.Media.openPhotoGallery({\r\n success: function(event) {\r\n ind.show();\r\n \r\n var xhr = Titanium.Network.createHTTPClient();\r\n xhr.onload = function(e) {\r\n Ti.UI.createAlertDialog({\r\n title: 'Success',\r\n message: 'status code ' + this.status\r\n }).show();\r\n };\r\n\r\n xhr.onerror = function(e) {\r\n Ti.API.info('post,E.ERROR:' + e.error);\r\n alert('post,E.ERROR:' + e.error);\r\n };\r\n \r\n xhr.onsendstream = function(e) {\r\n ind.value = e.progress;\r\n Ti.API.info('ONSENDSTREAM - PROGRESS: ' + e.progress);\r\n };\r\n\r\n xhr.open('POST', 'http://httpbin.org/post');\r\n\r\n xhr.send({\r\n file: event.media\r\n });\r\n },\r\n cancel: function() {\r\n // called when user cancels taking a picture\r\n // alert(\"cancel\");\r\n },\r\n error: function(error) {\r\n // called when there's an error\r\n alert(\"error: \" + error);\r\n },\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO]\r\n });\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nOutput:\r\n{code}\r\n2017-05-11 12:40:27.111 Titanium[2682:159030] [DEBUG] Application booted in 180.882990 ms\r\n2017-05-11 12:40:33.872227+0200 Titanium[2682:159030] [Generic] Creating an image format with an unknown type is an error\r\n2017-05-11 12:40:34.905 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.004124567378312349\r\n2017-05-11 12:40:35.680 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.1196124479174614\r\n2017-05-11 12:40:36.177 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.15673355758190155\r\n2017-05-11 12:40:36.702 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.18973009288311005\r\n2017-05-11 12:40:37.173 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.2268511950969696\r\n2017-05-11 12:40:38.145 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.2680968642234802\r\n2017-05-11 12:40:39.134 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.3382145166397095\r\n2017-05-11 12:40:40.054 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.40420758724212646\r\n2017-05-11 12:40:40.951 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.47020065784454346\r\n2017-05-11 12:40:41.845 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.5361937284469604\r\n2017-05-11 12:40:42.564 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.6021867990493774\r\n2017-05-11 12:40:43.242 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.6681798696517944\r\n2017-05-11 12:40:44.049 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.7341729998588562\r\n2017-05-11 12:40:44.773 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.8001660704612732\r\n2017-05-11 12:40:45.487 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.8661591410636902\r\n2017-05-11 12:40:46.569 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.9321522116661072\r\n2017-05-11 12:40:47.364 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.9981452822685242\r\n2017-05-11 12:40:56.592 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 1\r\n2017-05-11 12:40:57.041 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.1938546597957611\r\n2017-05-11 12:40:57.436 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.23097576200962067\r\n2017-05-11 12:40:58.325 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.2680968642234802\r\n2017-05-11 12:40:59.042 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.34233906865119934\r\n2017-05-11 12:40:59.971 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.4083321690559387\r\n2017-05-11 12:41:00.676 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.4743252396583557\r\n2017-05-11 12:41:01.406 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.5403183102607727\r\n2017-05-11 12:41:02.116 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.6063113808631897\r\n2017-05-11 12:41:03.024 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.6723044514656067\r\n2017-05-11 12:41:03.772 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.7382975220680237\r\n2017-05-11 12:41:04.494 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.8042905926704407\r\n2017-05-11 12:41:05.200 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.8702837228775024\r\n2017-05-11 12:41:05.903 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.9362767934799194\r\n2017-05-11 12:41:06.652 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 1\r\n2017-05-11 12:42:47.165 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.0025967087130993605\r\n2017-05-11 12:42:48.179 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.0753045529127121\r\n2017-05-11 12:42:48.986 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.09607822448015213\r\n2017-05-11 12:42:49.972 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.11944860219955444\r\n2017-05-11 12:42:50.908 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.14281898736953735\r\n2017-05-11 12:42:52.472 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.16618935763835907\r\n2017-05-11 12:42:53.885 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.2129301130771637\r\n2017-05-11 12:42:54.838 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.25447747111320496\r\n2017-05-11 12:42:55.565 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.29602479934692383\r\n2017-05-11 12:42:56.471 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.3375721275806427\r\n2017-05-11 12:42:57.209 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.37911948561668396\r\n2017-05-11 12:42:57.912 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.42066681385040283\r\n2017-05-11 12:42:58.623 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.4622141420841217\r\n2017-05-11 12:42:59.383 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.5037614703178406\r\n2017-05-11 12:43:00.078 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.5453088283538818\r\n2017-05-11 12:43:00.777 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.5868561863899231\r\n2017-05-11 12:43:01.466 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.6284035444259644\r\n2017-05-11 12:43:02.290 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.6699508428573608\r\n2017-05-11 12:43:02.987 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.7114982008934021\r\n2017-05-11 12:43:03.731 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.7530455589294434\r\n2017-05-11 12:43:04.443 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.7945928573608398\r\n2017-05-11 12:43:05.161 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.8361402153968811\r\n2017-05-11 12:43:05.913 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.8776875734329224\r\n2017-05-11 12:43:06.614 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.9192348718643188\r\n2017-05-11 12:43:07.312 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 0.9607822299003601\r\n2017-05-11 12:43:08.136 Titanium[2682:159030] [INFO] ONSENDSTREAM - PROGRESS: 1\r\n{code}\r\n\r\nI've sent 3 image via the gallery (all about 400-1200kb size) and it worked without any issues. I need to try this specific images, but I don't expect it to happen different. Besides that, we recently tried even with blobs having a size of 15 MB and more for TIMOB-24364, which has gone through both our QE testing and the reports QE cycle. If something was wrong with our API, that would have popped up there or inside our general unit-tests.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-05-11T10:44:36.000+0000", "updated": "2017-05-11T10:48:32.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }