{"action":"created","comment":{"url":"https://api.github.com/repos/weflex/react-native-wechat/pulls/comments/59475038","id":59475038,"diff_hunk":"@@ -412,20 +412,13 @@ private WXFileObject __jsonToFileMedia(ReadableMap data) {\n             return null;\n         }\n         String filePath = data.getString(\"filePath\");\n-        if (!filePath.toLowerCase().startsWith(\"file://\")) {\n-            filePath = \"file://\" + filePath;\n-        }\n         try {\n-            URI fileUri = URI.create(filePath);\n+            URI fileUri = URI.create(\"file://\" + filePath);\n             File file = new File(fileUri);\n             if (!file.exists()) {\n                 return null;\n             }\n-\n-            byte[] fileData = Files.toByteArray(file);\n-\n-            WXFileObject ret = new WXFileObject();\n-            ret.setFileData(fileData);\n+            WXFileObject ret = new WXFileObject(filePath);","path":"android/src/main/java/com/theweflex/react/WeChatModule.java","position":19,"original_position":19,"commit_id":"7630ea4a099bffed84abc84ddd46afd1f57d3997","original_commit_id":"7630ea4a099bffed84abc84ddd46afd1f57d3997","user":{"login":"xing-zheng","id":2860661,"avatar_url":"https://avatars.githubusercontent.com/u/2860661?v=3","gravatar_id":"","url":"https://api.github.com/users/xing-zheng","html_url":"https://github.com/xing-zheng","followers_url":"https://api.github.com/users/xing-zheng/followers","following_url":"https://api.github.com/users/xing-zheng/following{/other_user}","gists_url":"https://api.github.com/users/xing-zheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xing-zheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xing-zheng/subscriptions","organizations_url":"https://api.github.com/users/xing-zheng/orgs","repos_url":"https://api.github.com/users/xing-zheng/repos","events_url":"https://api.github.com/users/xing-zheng/events{/privacy}","received_events_url":"https://api.github.com/users/xing-zheng/received_events","type":"User","site_admin":false},"body":"@yorkie fileUri 和 file变量对于检查文件是否存在有一定帮助。\r\n\r\n另外，建议保留这个代码：\r\n```\r\nif (!filePath.toLowerCase().startsWith(\"file://\")) {\r\n        filePath = \"file://\" + filePath;\r\n}\r\n```","created_at":"2016-04-13T00:05:54Z","updated_at":"2016-04-13T00:05:54Z","html_url":"https://github.com/weflex/react-native-wechat/pull/52#discussion_r59475038","pull_request_url":"https://api.github.com/repos/weflex/react-native-wechat/pulls/52","_links":{"self":{"href":"https://api.github.com/repos/weflex/react-native-wechat/pulls/comments/59475038"},"html":{"href":"https://github.com/weflex/react-native-wechat/pull/52#discussion_r59475038"},"pull_request":{"href":"https://api.github.com/repos/weflex/react-native-wechat/pulls/52"}}},"pull_request":{"url":"https://api.github.com/repos/weflex/react-native-wechat/pulls/52","id":66099127,"html_url":"https://github.com/weflex/react-native-wechat/pull/52","diff_url":"https://github.com/weflex/react-native-wechat/pull/52.diff","patch_url":"https://github.com/weflex/react-native-wechat/pull/52.patch","issue_url":"https://api.github.com/repos/weflex/react-native-wechat/issues/52","number":52,"state":"open","locked":false,"title":"修改__jsonToFileMedia方法，修复无法分享文件的bug","user":{"login":"liuchungui","id":5763368,"avatar_url":"https://avatars.githubusercontent.com/u/5763368?v=3","gravatar_id":"","url":"https://api.github.com/users/liuchungui","html_url":"https://github.com/liuchungui","followers_url":"https://api.github.com/users/liuchungui/followers","following_url":"https://api.github.com/users/liuchungui/following{/other_user}","gists_url":"https://api.github.com/users/liuchungui/gists{/gist_id}","starred_url":"https://api.github.com/users/liuchungui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuchungui/subscriptions","organizations_url":"https://api.github.com/users/liuchungui/orgs","repos_url":"https://api.github.com/users/liuchungui/repos","events_url":"https://api.github.com/users/liuchungui/events{/privacy}","received_events_url":"https://api.github.com/users/liuchungui/received_events","type":"User","site_admin":false},"body":"修复[#51](https://github.com/weflex/react-native-wechat/issues/51)的问题","created_at":"2016-04-12T04:26:09Z","updated_at":"2016-04-13T00:05:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba72f0988da1e4b1fd859f0a0fcd6eccceb2263d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/weflex/react-native-wechat/pulls/52/commits","review_comments_url":"https://api.github.com/repos/weflex/react-native-wechat/pulls/52/comments","review_comment_url":"https://api.github.com/repos/weflex/react-native-wechat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/weflex/react-native-wechat/issues/52/comments","statuses_url":"https://api.github.com/repos/weflex/react-native-wechat/statuses/7630ea4a099bffed84abc84ddd46afd1f57d3997","head":{"label":"liuchungui:master","ref":"master","sha":"7630ea4a099bffed84abc84ddd46afd1f57d3997","user":{"login":"liuchungui","id":5763368,"avatar_url":"https://avatars.githubusercontent.com/u/5763368?v=3","gravatar_id":"","url":"https://api.github.com/users/liuchungui","html_url":"https://github.com/liuchungui","followers_url":"https://api.github.com/users/liuchungui/followers","following_url":"https://api.github.com/users/liuchungui/following{/other_user}","gists_url":"https://api.github.com/users/liuchungui/gists{/gist_id}","starred_url":"https://api.github.com/users/liuchungui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuchungui/subscriptions","organizations_url":"https://api.github.com/users/liuchungui/orgs","repos_url":"https://api.github.com/users/liuchungui/repos","events_url":"https://api.github.com/users/liuchungui/events{/privacy}","received_events_url":"https://api.github.com/users/liuchungui/received_events","type":"User","site_admin":false},"repo":{"id":56028697,"name":"react-native-wechat","full_name":"liuchungui/react-native-wechat","owner":{"login":"liuchungui","id":5763368,"avatar_url":"https://avatars.githubusercontent.com/u/5763368?v=3","gravatar_id":"","url":"https://api.github.com/users/liuchungui","html_url":"https://github.com/liuchungui","followers_url":"https://api.github.com/users/liuchungui/followers","following_url":"https://api.github.com/users/liuchungui/following{/other_user}","gists_url":"https://api.github.com/users/liuchungui/gists{/gist_id}","starred_url":"https://api.github.com/users/liuchungui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuchungui/subscriptions","organizations_url":"https://api.github.com/users/liuchungui/orgs","repos_url":"https://api.github.com/users/liuchungui/repos","events_url":"https://api.github.com/users/liuchungui/events{/privacy}","received_events_url":"https://api.github.com/users/liuchungui/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/liuchungui/react-native-wechat","description":"React-native(iOS/Android) functionalities includes WeChat login, share, favorite and payment","fork":true,"url":"https://api.github.com/repos/liuchungui/react-native-wechat","forks_url":"https://api.github.com/repos/liuchungui/react-native-wechat/forks","keys_url":"https://api.github.com/repos/liuchungui/react-native-wechat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liuchungui/react-native-wechat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liuchungui/react-native-wechat/teams","hooks_url":"https://api.github.com/repos/liuchungui/react-native-wechat/hooks","issue_events_url":"https://api.github.com/repos/liuchungui/react-native-wechat/issues/events{/number}","events_url":"https://api.github.com/repos/liuchungui/react-native-wechat/events","assignees_url":"https://api.github.com/repos/liuchungui/react-native-wechat/assignees{/user}","branches_url":"https://api.github.com/repos/liuchungui/react-native-wechat/branches{/branch}","tags_url":"https://api.github.com/repos/liuchungui/react-native-wechat/tags","blobs_url":"https://api.github.com/repos/liuchungui/react-native-wechat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liuchungui/react-native-wechat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liuchungui/react-native-wechat/git/refs{/sha}","trees_url":"https://api.github.com/repos/liuchungui/react-native-wechat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liuchungui/react-native-wechat/statuses/{sha}","languages_url":"https://api.github.com/repos/liuchungui/react-native-wechat/languages","stargazers_url":"https://api.github.com/repos/liuchungui/react-native-wechat/stargazers","contributors_url":"https://api.github.com/repos/liuchungui/react-native-wechat/contributors","subscribers_url":"https://api.github.com/repos/liuchungui/react-native-wechat/subscribers","subscription_url":"https://api.github.com/repos/liuchungui/react-native-wechat/subscription","commits_url":"https://api.github.com/repos/liuchungui/react-native-wechat/commits{/sha}","git_commits_url":"https://api.github.com/repos/liuchungui/react-native-wechat/git/commits{/sha}","comments_url":"https://api.github.com/repos/liuchungui/react-native-wechat/comments{/number}","issue_comment_url":"https://api.github.com/repos/liuchungui/react-native-wechat/issues/comments{/number}","contents_url":"https://api.github.com/repos/liuchungui/react-native-wechat/contents/{+path}","compare_url":"https://api.github.com/repos/liuchungui/react-native-wechat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liuchungui/react-native-wechat/merges","archive_url":"https://api.github.com/repos/liuchungui/react-native-wechat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liuchungui/react-native-wechat/downloads","issues_url":"https://api.github.com/repos/liuchungui/react-native-wechat/issues{/number}","pulls_url":"https://api.github.com/repos/liuchungui/react-native-wechat/pulls{/number}","milestones_url":"https://api.github.com/repos/liuchungui/react-native-wechat/milestones{/number}","notifications_url":"https://api.github.com/repos/liuchungui/react-native-wechat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liuchungui/react-native-wechat/labels{/name}","releases_url":"https://api.github.com/repos/liuchungui/react-native-wechat/releases{/id}","deployments_url":"https://api.github.com/repos/liuchungui/react-native-wechat/deployments","created_at":"2016-04-12T03:43:30Z","updated_at":"2016-04-12T03:43:32Z","pushed_at":"2016-04-12T04:20:16Z","git_url":"git://github.com/liuchungui/react-native-wechat.git","ssh_url":"git@github.com:liuchungui/react-native-wechat.git","clone_url":"https://github.com/liuchungui/react-native-wechat.git","svn_url":"https://github.com/liuchungui/react-native-wechat","homepage":"http://code.weflex.org/react-native-wechat","size":12249,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"weflex:master","ref":"master","sha":"0c3869105c86c430e97110b36dca4a723fef837c","user":{"login":"weflex","id":12624675,"avatar_url":"https://avatars.githubusercontent.com/u/12624675?v=3","gravatar_id":"","url":"https://api.github.com/users/weflex","html_url":"https://github.com/weflex","followers_url":"https://api.github.com/users/weflex/followers","following_url":"https://api.github.com/users/weflex/following{/other_user}","gists_url":"https://api.github.com/users/weflex/gists{/gist_id}","starred_url":"https://api.github.com/users/weflex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weflex/subscriptions","organizations_url":"https://api.github.com/users/weflex/orgs","repos_url":"https://api.github.com/users/weflex/repos","events_url":"https://api.github.com/users/weflex/events{/privacy}","received_events_url":"https://api.github.com/users/weflex/received_events","type":"Organization","site_admin":false},"repo":{"id":44363636,"name":"react-native-wechat","full_name":"weflex/react-native-wechat","owner":{"login":"weflex","id":12624675,"avatar_url":"https://avatars.githubusercontent.com/u/12624675?v=3","gravatar_id":"","url":"https://api.github.com/users/weflex","html_url":"https://github.com/weflex","followers_url":"https://api.github.com/users/weflex/followers","following_url":"https://api.github.com/users/weflex/following{/other_user}","gists_url":"https://api.github.com/users/weflex/gists{/gist_id}","starred_url":"https://api.github.com/users/weflex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weflex/subscriptions","organizations_url":"https://api.github.com/users/weflex/orgs","repos_url":"https://api.github.com/users/weflex/repos","events_url":"https://api.github.com/users/weflex/events{/privacy}","received_events_url":"https://api.github.com/users/weflex/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weflex/react-native-wechat","description":"React-native(iOS/Android) functionalities includes WeChat login, share, favorite and payment","fork":false,"url":"https://api.github.com/repos/weflex/react-native-wechat","forks_url":"https://api.github.com/repos/weflex/react-native-wechat/forks","keys_url":"https://api.github.com/repos/weflex/react-native-wechat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weflex/react-native-wechat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weflex/react-native-wechat/teams","hooks_url":"https://api.github.com/repos/weflex/react-native-wechat/hooks","issue_events_url":"https://api.github.com/repos/weflex/react-native-wechat/issues/events{/number}","events_url":"https://api.github.com/repos/weflex/react-native-wechat/events","assignees_url":"https://api.github.com/repos/weflex/react-native-wechat/assignees{/user}","branches_url":"https://api.github.com/repos/weflex/react-native-wechat/branches{/branch}","tags_url":"https://api.github.com/repos/weflex/react-native-wechat/tags","blobs_url":"https://api.github.com/repos/weflex/react-native-wechat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weflex/react-native-wechat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weflex/react-native-wechat/git/refs{/sha}","trees_url":"https://api.github.com/repos/weflex/react-native-wechat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weflex/react-native-wechat/statuses/{sha}","languages_url":"https://api.github.com/repos/weflex/react-native-wechat/languages","stargazers_url":"https://api.github.com/repos/weflex/react-native-wechat/stargazers","contributors_url":"https://api.github.com/repos/weflex/react-native-wechat/contributors","subscribers_url":"https://api.github.com/repos/weflex/react-native-wechat/subscribers","subscription_url":"https://api.github.com/repos/weflex/react-native-wechat/subscription","commits_url":"https://api.github.com/repos/weflex/react-native-wechat/commits{/sha}","git_commits_url":"https://api.github.com/repos/weflex/react-native-wechat/git/commits{/sha}","comments_url":"https://api.github.com/repos/weflex/react-native-wechat/comments{/number}","issue_comment_url":"https://api.github.com/repos/weflex/react-native-wechat/issues/comments{/number}","contents_url":"https://api.github.com/repos/weflex/react-native-wechat/contents/{+path}","compare_url":"https://api.github.com/repos/weflex/react-native-wechat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weflex/react-native-wechat/merges","archive_url":"https://api.github.com/repos/weflex/react-native-wechat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weflex/react-native-wechat/downloads","issues_url":"https://api.github.com/repos/weflex/react-native-wechat/issues{/number}","pulls_url":"https://api.github.com/repos/weflex/react-native-wechat/pulls{/number}","milestones_url":"https://api.github.com/repos/weflex/react-native-wechat/milestones{/number}","notifications_url":"https://api.github.com/repos/weflex/react-native-wechat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weflex/react-native-wechat/labels{/name}","releases_url":"https://api.github.com/repos/weflex/react-native-wechat/releases{/id}","deployments_url":"https://api.github.com/repos/weflex/react-native-wechat/deployments","created_at":"2015-10-16T05:12:31Z","updated_at":"2016-04-12T11:53:59Z","pushed_at":"2016-04-12T04:26:11Z","git_url":"git://github.com/weflex/react-native-wechat.git","ssh_url":"git@github.com:weflex/react-native-wechat.git","clone_url":"https://github.com/weflex/react-native-wechat.git","svn_url":"https://github.com/weflex/react-native-wechat","homepage":"http://code.weflex.org/react-native-wechat","size":12265,"stargazers_count":175,"watchers_count":175,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":46,"mirror_url":null,"open_issues_count":13,"forks":46,"open_issues":13,"watchers":175,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/weflex/react-native-wechat/pulls/52"},"html":{"href":"https://github.com/weflex/react-native-wechat/pull/52"},"issue":{"href":"https://api.github.com/repos/weflex/react-native-wechat/issues/52"},"comments":{"href":"https://api.github.com/repos/weflex/react-native-wechat/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/weflex/react-native-wechat/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/weflex/react-native-wechat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/weflex/react-native-wechat/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/weflex/react-native-wechat/statuses/7630ea4a099bffed84abc84ddd46afd1f57d3997"}}}}