{"action":"created","comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls/comments/89874256","pull_request_review_id":10405247,"id":89874256,"diff_hunk":"@@ -0,0 +1,140 @@\n+<?php\n+\n+namespace SilverStripe\\AssetAdmin\\Forms;\n+\n+use SilverStripe\\AssetAdmin\\Controller\\AssetAdmin;\n+use SilverStripe\\Assets\\Folder;\n+use SilverStripe\\Forms\\FileUploadable;\n+use SilverStripe\\Forms\\FormField;\n+use SilverStripe\\ORM\\DataObject;\n+use SilverStripe\\ORM\\SS_List;\n+\n+/**\n+ * Represents a file upload field with ReactJS based frontend.\n+ *\n+ * Allows writing to a parent record with the following relation types:\n+ *   - has_one\n+ *   - has_many\n+ *   - many_many\n+ *\n+ * Additionally supports writing directly to the File table not attached\n+ * to any parent record.\n+ */\n+class FileField extends FormField\n+{\n+    use FileUploadable;\n+\n+    /**\n+     * @config\n+     * @var int\n+     */\n+    private static $thumbnail_width = 60;","path":"code/Forms/FileField.php","position":31,"original_position":31,"commit_id":"2725b56e5d773feb5c41ee7c8cb2ca817c06b378","original_commit_id":"fc50c074b046d787308d6bbe00e6d3bdaa533f9f","user":{"login":"tractorcow","id":936064,"avatar_url":"https://avatars.githubusercontent.com/u/936064?v=3","gravatar_id":"","url":"https://api.github.com/users/tractorcow","html_url":"https://github.com/tractorcow","followers_url":"https://api.github.com/users/tractorcow/followers","following_url":"https://api.github.com/users/tractorcow/following{/other_user}","gists_url":"https://api.github.com/users/tractorcow/gists{/gist_id}","starred_url":"https://api.github.com/users/tractorcow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tractorcow/subscriptions","organizations_url":"https://api.github.com/users/tractorcow/orgs","repos_url":"https://api.github.com/users/tractorcow/repos","events_url":"https://api.github.com/users/tractorcow/events{/privacy}","received_events_url":"https://api.github.com/users/tractorcow/received_events","type":"User","site_admin":false},"body":"We aren't doing psr-2 yet in asset-admin.","created_at":"2016-11-28T20:13:39Z","updated_at":"2016-11-28T20:13:39Z","html_url":"https://github.com/silverstripe/silverstripe-asset-admin/pull/312#discussion_r89874256","pull_request_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls/312","_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls/comments/89874256"},"html":{"href":"https://github.com/silverstripe/silverstripe-asset-admin/pull/312#discussion_r89874256"},"pull_request":{"href":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls/312"}}},"pull_request":{"url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls/312","id":94745076,"html_url":"https://github.com/silverstripe/silverstripe-asset-admin/pull/312","diff_url":"https://github.com/silverstripe/silverstripe-asset-admin/pull/312.diff","patch_url":"https://github.com/silverstripe/silverstripe-asset-admin/pull/312.patch","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/312","number":312,"state":"open","locked":false,"title":"API Implement react FileField","user":{"login":"tractorcow","id":936064,"avatar_url":"https://avatars.githubusercontent.com/u/936064?v=3","gravatar_id":"","url":"https://api.github.com/users/tractorcow","html_url":"https://github.com/tractorcow","followers_url":"https://api.github.com/users/tractorcow/followers","following_url":"https://api.github.com/users/tractorcow/following{/other_user}","gists_url":"https://api.github.com/users/tractorcow/gists{/gist_id}","starred_url":"https://api.github.com/users/tractorcow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tractorcow/subscriptions","organizations_url":"https://api.github.com/users/tractorcow/orgs","repos_url":"https://api.github.com/users/tractorcow/repos","events_url":"https://api.github.com/users/tractorcow/events{/privacy}","received_events_url":"https://api.github.com/users/tractorcow/received_events","type":"User","site_admin":false},"body":"Requires https://github.com/silverstripe/silverstripe-framework/pull/6325\r\n\r\nCloses #296","created_at":"2016-11-22T04:09:23Z","updated_at":"2016-11-28T20:13:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"604fcb38d22a317ba569dc7489efcda777863fd8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls/312/commits","review_comments_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls/312/comments","review_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/312/comments","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/statuses/2725b56e5d773feb5c41ee7c8cb2ca817c06b378","head":{"label":"open-sausages:pulls/4.0/uploadfield","ref":"pulls/4.0/uploadfield","sha":"2725b56e5d773feb5c41ee7c8cb2ca817c06b378","user":{"login":"open-sausages","id":12824172,"avatar_url":"https://avatars.githubusercontent.com/u/12824172?v=3","gravatar_id":"","url":"https://api.github.com/users/open-sausages","html_url":"https://github.com/open-sausages","followers_url":"https://api.github.com/users/open-sausages/followers","following_url":"https://api.github.com/users/open-sausages/following{/other_user}","gists_url":"https://api.github.com/users/open-sausages/gists{/gist_id}","starred_url":"https://api.github.com/users/open-sausages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-sausages/subscriptions","organizations_url":"https://api.github.com/users/open-sausages/orgs","repos_url":"https://api.github.com/users/open-sausages/repos","events_url":"https://api.github.com/users/open-sausages/events{/privacy}","received_events_url":"https://api.github.com/users/open-sausages/received_events","type":"Organization","site_admin":false},"repo":{"id":55116207,"name":"silverstripe-asset-admin","full_name":"open-sausages/silverstripe-asset-admin","owner":{"login":"open-sausages","id":12824172,"avatar_url":"https://avatars.githubusercontent.com/u/12824172?v=3","gravatar_id":"","url":"https://api.github.com/users/open-sausages","html_url":"https://github.com/open-sausages","followers_url":"https://api.github.com/users/open-sausages/followers","following_url":"https://api.github.com/users/open-sausages/following{/other_user}","gists_url":"https://api.github.com/users/open-sausages/gists{/gist_id}","starred_url":"https://api.github.com/users/open-sausages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-sausages/subscriptions","organizations_url":"https://api.github.com/users/open-sausages/orgs","repos_url":"https://api.github.com/users/open-sausages/repos","events_url":"https://api.github.com/users/open-sausages/events{/privacy}","received_events_url":"https://api.github.com/users/open-sausages/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/open-sausages/silverstripe-asset-admin","description":"PoC for SilverStripe assets gallery","fork":true,"url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin","forks_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/forks","keys_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/teams","hooks_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/hooks","issue_events_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/issues/events{/number}","events_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/events","assignees_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/assignees{/user}","branches_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/branches{/branch}","tags_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/tags","blobs_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/languages","stargazers_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/stargazers","contributors_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/contributors","subscribers_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/subscribers","subscription_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/subscription","commits_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/contents/{+path}","compare_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/merges","archive_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/downloads","issues_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/issues{/number}","pulls_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/labels{/name}","releases_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/releases{/id}","deployments_url":"https://api.github.com/repos/open-sausages/silverstripe-asset-admin/deployments","created_at":"2016-03-31T03:10:13Z","updated_at":"2016-03-31T03:10:13Z","pushed_at":"2016-11-27T23:19:49Z","git_url":"git://github.com/open-sausages/silverstripe-asset-admin.git","ssh_url":"git@github.com:open-sausages/silverstripe-asset-admin.git","clone_url":"https://github.com/open-sausages/silverstripe-asset-admin.git","svn_url":"https://github.com/open-sausages/silverstripe-asset-admin","homepage":null,"size":4265,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"silverstripe:master","ref":"master","sha":"a511adc601caed3f1de28543c1a1c309a5d8b50b","user":{"login":"silverstripe","id":379348,"avatar_url":"https://avatars.githubusercontent.com/u/379348?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe","html_url":"https://github.com/silverstripe","followers_url":"https://api.github.com/users/silverstripe/followers","following_url":"https://api.github.com/users/silverstripe/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe/subscriptions","organizations_url":"https://api.github.com/users/silverstripe/orgs","repos_url":"https://api.github.com/users/silverstripe/repos","events_url":"https://api.github.com/users/silverstripe/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe/received_events","type":"Organization","site_admin":false},"repo":{"id":42913926,"name":"silverstripe-asset-admin","full_name":"silverstripe/silverstripe-asset-admin","owner":{"login":"silverstripe","id":379348,"avatar_url":"https://avatars.githubusercontent.com/u/379348?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe","html_url":"https://github.com/silverstripe","followers_url":"https://api.github.com/users/silverstripe/followers","following_url":"https://api.github.com/users/silverstripe/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe/subscriptions","organizations_url":"https://api.github.com/users/silverstripe/orgs","repos_url":"https://api.github.com/users/silverstripe/repos","events_url":"https://api.github.com/users/silverstripe/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/silverstripe/silverstripe-asset-admin","description":"PoC for SilverStripe assets gallery","fork":false,"url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin","forks_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/forks","keys_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/teams","hooks_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/hooks","issue_events_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/events{/number}","events_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/events","assignees_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/assignees{/user}","branches_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/branches{/branch}","tags_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/tags","blobs_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/languages","stargazers_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/stargazers","contributors_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/contributors","subscribers_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/subscribers","subscription_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/subscription","commits_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/contents/{+path}","compare_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/merges","archive_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/downloads","issues_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues{/number}","pulls_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/labels{/name}","releases_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/releases{/id}","deployments_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/deployments","created_at":"2015-09-22T05:44:24Z","updated_at":"2016-11-03T03:38:05Z","pushed_at":"2016-11-24T23:44:30Z","git_url":"git://github.com/silverstripe/silverstripe-asset-admin.git","ssh_url":"git@github.com:silverstripe/silverstripe-asset-admin.git","clone_url":"https://github.com/silverstripe/silverstripe-asset-admin.git","svn_url":"https://github.com/silverstripe/silverstripe-asset-admin","homepage":null,"size":4665,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":44,"forks":14,"open_issues":44,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls/312"},"html":{"href":"https://github.com/silverstripe/silverstripe-asset-admin/pull/312"},"issue":{"href":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/312"},"comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/312/comments"},"review_comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls/312/comments"},"review_comment":{"href":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls/312/commits"},"statuses":{"href":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/statuses/2725b56e5d773feb5c41ee7c8cb2ca817c06b378"}}}}
{"actor":{"display_login":"tractorcow"}}