{ "id": "153501", "key": "AC-519", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "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": "2015-12-03T06:38:20.000+0000", "created": "2015-11-30T12:25:27.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-12-03T06:38:20.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Hi guys,\r\nI successfully used this code to send image via JSON to server:\r\nTi.Utils.base64encode(event.media).toString() \r\nevent.media is image taken from camera or from gallery.\r\nWhen I use this code now, it gives me a warning:\r\n*** ASL MESSAGE SIZE (8132517 bytes) EXCEEDED MAXIMIMUM SIZE (2048000 bytes) ***\r\nI can't get base64 string from image, so I can't send it.\r\nIf I try to alert that \"string\", it freezes whole app for a while and then shows empty alert window, which is very high(but it's empty).\r\nCan you please help me?\r\nThank you.", "attachment": [], "flagged": false, "summary": "Encoding image from camera to base64 string not working - ASL MESSAGE SIZE EXCEEDED MAXIMIMUM SIZE", "creator": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "subtasks": [], "reporter": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "environment": "Appcelerator Studio, build: 4.3.3.201510212245, Ti SDK 5.0.2", "comment": { "comments": [ { "id": "371910", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~max87], The issue might be in your server side. You can follow this [post|https://community.websense.com/forums/p/35378/57619.aspx]. Also, can you update to the latest SDK 5.1.1.GA and check? \r\n\r\nAlso here are some links on base64 encoding issues. \r\n\r\n[Link1|https://developer.appcelerator.com/question/136810/cant-encode-imageview-to-base64-string]\r\n[Link2|https://developer.appcelerator.com/question/125518/encode-image-to-base64]\r\n\r\nThanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2015-12-02T13:29:47.000+0000", "updated": "2015-12-02T13:29:47.000+0000" }, { "id": "371917", "author": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "body": "Hi Sharif,\r\nthank you for your answer. I discovered, that image from camera/photogallery might be too big, so I created method that checks that image for size and if needed, it resize it to half width and height. This method then call self recursively and checks again, so finally, I get smaller image with proper size, but I can convert it to base64 and send it to server.\r\nThank you", "updateAuthor": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "created": "2015-12-02T14:12:14.000+0000", "updated": "2015-12-02T14:12:14.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }