{"action":"created","issue":{"url":"https://api.github.com/repos/hgoebl/DavidWebb/issues/11","labels_url":"https://api.github.com/repos/hgoebl/DavidWebb/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/hgoebl/DavidWebb/issues/11/comments","events_url":"https://api.github.com/repos/hgoebl/DavidWebb/issues/11/events","html_url":"https://github.com/hgoebl/DavidWebb/issues/11","id":110237506,"number":11,"title":"Send a file on request","user":{"login":"LuisDominguez","id":5997908,"avatar_url":"https://avatars.githubusercontent.com/u/5997908?v=3","gravatar_id":"","url":"https://api.github.com/users/LuisDominguez","html_url":"https://github.com/LuisDominguez","followers_url":"https://api.github.com/users/LuisDominguez/followers","following_url":"https://api.github.com/users/LuisDominguez/following{/other_user}","gists_url":"https://api.github.com/users/LuisDominguez/gists{/gist_id}","starred_url":"https://api.github.com/users/LuisDominguez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuisDominguez/subscriptions","organizations_url":"https://api.github.com/users/LuisDominguez/orgs","repos_url":"https://api.github.com/users/LuisDominguez/repos","events_url":"https://api.github.com/users/LuisDominguez/events{/privacy}","received_events_url":"https://api.github.com/users/LuisDominguez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-07T14:27:49Z","updated_at":"2015-10-07T16:20:56Z","closed_at":null,"body":"Hello i add a video file on request\r\n\r\n                Uri uri_video = Uri.parse(temp_usuario.getString(\"video_url\"));\r\n                File file = new File(getPath(uri_video));\r\n                Webb webb = Webb.create();\r\n                Response<String> response = webb\r\n                        .post(getString(R.string.REST_URL) + \"acciones_de_app/create_user.json\")\r\n                        .body(file)\r\n                        .connectTimeout(10 * 3000)\r\n                        .asString();\r\n\r\n                if (response.isSuccess()) {\r\n                    String outcome = response.getBody();\r\n                    Log.e(\"a\",outcome);\r\n\r\n\r\n                } else {\r\n                    System.out.println(response.getStatusCode());\r\n                    System.out.println(response.getResponseMessage());\r\n                    System.out.println(response.getErrorBody());\r\n                }\r\n           \r\n\r\n But when i recieved a body on action post\r\n\r\nfile = request.body.read\r\nfp = File.open(\"/home/master/Escritorio/video_rest/video_mp.mp4\", \"wb\") \r\n\t\t\t\tfp.write(request.body.read) \r\n\t\t\t\tfp.close\r\n\r\nmy file video_mp.mp4 created size a 0 byte \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/hgoebl/DavidWebb/issues/comments/146250458","html_url":"https://github.com/hgoebl/DavidWebb/issues/11#issuecomment-146250458","issue_url":"https://api.github.com/repos/hgoebl/DavidWebb/issues/11","id":146250458,"user":{"login":"LuisDominguez","id":5997908,"avatar_url":"https://avatars.githubusercontent.com/u/5997908?v=3","gravatar_id":"","url":"https://api.github.com/users/LuisDominguez","html_url":"https://github.com/LuisDominguez","followers_url":"https://api.github.com/users/LuisDominguez/followers","following_url":"https://api.github.com/users/LuisDominguez/following{/other_user}","gists_url":"https://api.github.com/users/LuisDominguez/gists{/gist_id}","starred_url":"https://api.github.com/users/LuisDominguez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuisDominguez/subscriptions","organizations_url":"https://api.github.com/users/LuisDominguez/orgs","repos_url":"https://api.github.com/users/LuisDominguez/repos","events_url":"https://api.github.com/users/LuisDominguez/events{/privacy}","received_events_url":"https://api.github.com/users/LuisDominguez/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T16:20:56Z","updated_at":"2015-10-07T16:20:56Z","body":"Hello thanks for resonder \r\n\r\nfirst point:  Yes file exist and really ponting for video file\r\n\r\nsecond point:  i puts a request.body.read and not empty have A <STRINGIO> \r\n\r\nim try with \r\nimage=nil\r\n\t\t\tStringIO.open(request.body.read) do |data|\r\n\t\t\t    data.class.class_eval { attr_accessor :original_filename, :content_type }\r\n\t\t\t    data.original_filename = \"temp#{DateTime.now.to_i}.mp4\"\r\n\t\t\t    data.content_type = \"video/mp4\" \r\n\t\t\t    image = data\r\n\t\t\t end\r\n \r\n\r\nfp = File.open(\"/home/luis/Escritorio/video_rest/video_mp.mp4\", \"wb\") \r\n\t\t\tfp.write(image) \r\n\t\t\tfp.close\r\n\r\n\r\nis ruby on rails but i dont know if body http content are correct"}}