{"action":"created","issue":{"url":"https://api.github.com/repos/delight-im/Android-AdvancedWebView/issues/14","labels_url":"https://api.github.com/repos/delight-im/Android-AdvancedWebView/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/delight-im/Android-AdvancedWebView/issues/14/comments","events_url":"https://api.github.com/repos/delight-im/Android-AdvancedWebView/issues/14/events","html_url":"https://github.com/delight-im/Android-AdvancedWebView/issues/14","id":59360717,"number":14,"title":"Missing content_type in file upload with Android 4.4.4","user":{"login":"neonmate","id":2969758,"avatar_url":"https://avatars.githubusercontent.com/u/2969758?v=3","gravatar_id":"","url":"https://api.github.com/users/neonmate","html_url":"https://github.com/neonmate","followers_url":"https://api.github.com/users/neonmate/followers","following_url":"https://api.github.com/users/neonmate/following{/other_user}","gists_url":"https://api.github.com/users/neonmate/gists{/gist_id}","starred_url":"https://api.github.com/users/neonmate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neonmate/subscriptions","organizations_url":"https://api.github.com/users/neonmate/orgs","repos_url":"https://api.github.com/users/neonmate/repos","events_url":"https://api.github.com/users/neonmate/events{/privacy}","received_events_url":"https://api.github.com/users/neonmate/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/delight-im/Android-AdvancedWebView/labels/invalid","name":"invalid","color":"e6e6e6"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-28T22:03:27Z","updated_at":"2015-11-23T05:39:29Z","closed_at":"2015-03-01T18:10:07Z","body":"Hello,\r\n\r\nI am trying to upload images via a WebView in Android. Both your implementation as http://stackoverflow.com/questions/5907369/file-upload-in-webview are not properly working for me with Android 4.4.4. Here is an extract from the received data:\r\n\r\n**Android 4.4.4**\r\n\r\n    Parameters: {\"utf8\"=>\"✓\", \"authenticity_token\"=>\"Vximz1fjqQcRpeYvek3G3tfK2L9wiQQSm837Zj5+aBI=\", \"item\"=>{\"image\"=>#<ActionDispatch::Http::UploadedFile:0x007f2e49ab35f0 @tempfile=#<Tempfile:/tmp/RackMultipart20150228-10308-h8g0yc>, @original_filename=\"image:1641\", @content_type=\"application/octet-stream\", @headers=\"Content-Disposition: form-data; name=\\\"item[image]\\\"; filename=\\\"image%3A1641\\\"\\r\\nContent-Type: application/octet-stream\\r\\n\">, \"description\"=>\"\", \"for_friends\"=>\"0\", \"for_family\"=>\"0\", \"for_acquaintances\"=>\"0\"}, \"commit\"=>\"Speichern\", \"user_id\"=>\"1\"}\r\n\r\n**Android 5.0**\r\n\r\n    Parameters: {\"utf8\"=>\"✓\", \"authenticity_token\"=>\"f/5PkwJ+g/30G7oWrsUizn0Lh7jzMsGMxnz264NorzQ=\", \"item\"=>{\"image\"=>#<ActionDispatch::Http::UploadedFile:0x007f2e4a771710 @tempfile=#<Tempfile:/tmp/RackMultipart20150228-10308-1uacuce>, @original_filename=\"IMG_20150228_161113.jpg\", @content_type=\"image/jpeg\", @headers=\"Content-Disposition: form-data; name=\\\"item[image]\\\"; filename=\\\"IMG_20150228_161113.jpg\\\"\\r\\nContent-Type: image/jpeg\\r\\n\">, \"description\"=>\"\", \"for_friends\"=>\"0\", \"for_family\"=>\"0\", \"for_acquaintances\"=>\"0\"}, \"commit\"=>\"Speichern\", \"user_id\"=>\"1\"}\r\n\r\nThe problem is the missing content type. Not even the filename has a content type extension. I tried things like setting the content type in the WebView manually with\r\n\r\n    setType(\"image/jpeg\");\r\n\r\nBut that approach doesn't work. Perhaps you know a solution for this issue. Thanks!"},"comment":{"url":"https://api.github.com/repos/delight-im/Android-AdvancedWebView/issues/comments/158857236","html_url":"https://github.com/delight-im/Android-AdvancedWebView/issues/14#issuecomment-158857236","issue_url":"https://api.github.com/repos/delight-im/Android-AdvancedWebView/issues/14","id":158857236,"user":{"login":"EdoEscada","id":1195127,"avatar_url":"https://avatars.githubusercontent.com/u/1195127?v=3","gravatar_id":"","url":"https://api.github.com/users/EdoEscada","html_url":"https://github.com/EdoEscada","followers_url":"https://api.github.com/users/EdoEscada/followers","following_url":"https://api.github.com/users/EdoEscada/following{/other_user}","gists_url":"https://api.github.com/users/EdoEscada/gists{/gist_id}","starred_url":"https://api.github.com/users/EdoEscada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EdoEscada/subscriptions","organizations_url":"https://api.github.com/users/EdoEscada/orgs","repos_url":"https://api.github.com/users/EdoEscada/repos","events_url":"https://api.github.com/users/EdoEscada/events{/privacy}","received_events_url":"https://api.github.com/users/EdoEscada/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T05:39:29Z","updated_at":"2015-11-23T05:39:29Z","body":"@mwaclawek thank you and high appreciate dor reply"}}