{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/pulls/comments/67752229","id":67752229,"diff_hunk":"@@ -0,0 +1,39 @@\n+import Ember from 'ember';\n+import layout from './template';\n+\n+export default Ember.Component.extend({\n+    layout,\n+    session: Ember.inject.service(),\n+    classNames: ['dropzone'],\n+    didRender() {\n+        this.buildUrl = this.get('buildUrl');\n+        var preUpload = this.get('preUpload');\n+        var dropzoneOptions = this.get('options');\n+        var listeners = this.get('listeners');\n+        if (!this.attrs.buildUrl && !preUpload && (!this.dropzoneOptions || !this.dropzoneOptions.url)) {\n+            console.error('Need to define url somewhere');\n+        }\n+        var drop = new Dropzone('#' + this.elementId, {  // jshint ignore:line\n+            url: file => typeof this.attrs.buildUrl === 'function' ? this.attrs.buildUrl(file) : this.get('buildUrl'),\n+            autoProcessQueue: false,\n+        });\n+\n+        let headers = {};\n+        this.get('session').authorize('authorizer:osf-token', (headerName, content) => {\n+            headers[headerName] = content;\n+        });\n+\n+        drop.options.headers = headers;\n+        drop.on('addedfile', file => {\n+            if (preUpload) {\n+                preUpload(this, drop, file).then(() => drop.processFile(file));\n+            } else {\n+                drop.processFile(file);\n+            }\n+        });\n+        drop.options = Ember.$.extend({}, drop.options, dropzoneOptions);","path":"addon/components/dropzone-widget/component.js","position":34,"original_position":34,"commit_id":"6fa9714d3265d2f494ea722687642026beb16780","original_commit_id":"6fa9714d3265d2f494ea722687642026beb16780","user":{"login":"samchrisinger","id":2207561,"avatar_url":"https://avatars.githubusercontent.com/u/2207561?v=3","gravatar_id":"","url":"https://api.github.com/users/samchrisinger","html_url":"https://github.com/samchrisinger","followers_url":"https://api.github.com/users/samchrisinger/followers","following_url":"https://api.github.com/users/samchrisinger/following{/other_user}","gists_url":"https://api.github.com/users/samchrisinger/gists{/gist_id}","starred_url":"https://api.github.com/users/samchrisinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samchrisinger/subscriptions","organizations_url":"https://api.github.com/users/samchrisinger/orgs","repos_url":"https://api.github.com/users/samchrisinger/repos","events_url":"https://api.github.com/users/samchrisinger/events{/privacy}","received_events_url":"https://api.github.com/users/samchrisinger/received_events","type":"User","site_admin":false},"body":"`Ember.assign` or `Ember.merge` is preferred here.","created_at":"2016-06-20T19:37:02Z","updated_at":"2016-06-20T19:37:02Z","html_url":"https://github.com/CenterForOpenScience/ember-osf/pull/72#discussion_r67752229","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf/pulls/comments/67752229"},"html":{"href":"https://github.com/CenterForOpenScience/ember-osf/pull/72#discussion_r67752229"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/pulls/72","id":74281862,"html_url":"https://github.com/CenterForOpenScience/ember-osf/pull/72","diff_url":"https://github.com/CenterForOpenScience/ember-osf/pull/72.diff","patch_url":"https://github.com/CenterForOpenScience/ember-osf/pull/72.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/issues/72","number":72,"state":"open","locked":false,"title":"Feature/dropzone","user":{"login":"hmoco","id":6268982,"avatar_url":"https://avatars.githubusercontent.com/u/6268982?v=3","gravatar_id":"","url":"https://api.github.com/users/hmoco","html_url":"https://github.com/hmoco","followers_url":"https://api.github.com/users/hmoco/followers","following_url":"https://api.github.com/users/hmoco/following{/other_user}","gists_url":"https://api.github.com/users/hmoco/gists{/gist_id}","starred_url":"https://api.github.com/users/hmoco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmoco/subscriptions","organizations_url":"https://api.github.com/users/hmoco/orgs","repos_url":"https://api.github.com/users/hmoco/repos","events_url":"https://api.github.com/users/hmoco/events{/privacy}","received_events_url":"https://api.github.com/users/hmoco/received_events","type":"User","site_admin":false},"body":"## Ticket\r\nhttps://openscience.atlassian.net/browse/EOSF-69\r\n# Purpose\r\nAll purpose dropzone widget, with hooks for after drop and before upload functionality.\r\n\r\n## Routes Added/Updated\r\nUpdate nodes page with dropzone for file upload to any node.\r\n\r\n","created_at":"2016-06-17T18:02:00Z","updated_at":"2016-06-20T19:37:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64a8e99b563aa6bff46f3a94754aedcc1f5209a1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/pulls/72/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/pulls/72/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/issues/72/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/statuses/6fa9714d3265d2f494ea722687642026beb16780","head":{"label":"hmoco:feature/dropzone","ref":"feature/dropzone","sha":"6fa9714d3265d2f494ea722687642026beb16780","user":{"login":"hmoco","id":6268982,"avatar_url":"https://avatars.githubusercontent.com/u/6268982?v=3","gravatar_id":"","url":"https://api.github.com/users/hmoco","html_url":"https://github.com/hmoco","followers_url":"https://api.github.com/users/hmoco/followers","following_url":"https://api.github.com/users/hmoco/following{/other_user}","gists_url":"https://api.github.com/users/hmoco/gists{/gist_id}","starred_url":"https://api.github.com/users/hmoco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmoco/subscriptions","organizations_url":"https://api.github.com/users/hmoco/orgs","repos_url":"https://api.github.com/users/hmoco/repos","events_url":"https://api.github.com/users/hmoco/events{/privacy}","received_events_url":"https://api.github.com/users/hmoco/received_events","type":"User","site_admin":false},"repo":{"id":58221846,"name":"ember-osf","full_name":"hmoco/ember-osf","owner":{"login":"hmoco","id":6268982,"avatar_url":"https://avatars.githubusercontent.com/u/6268982?v=3","gravatar_id":"","url":"https://api.github.com/users/hmoco","html_url":"https://github.com/hmoco","followers_url":"https://api.github.com/users/hmoco/followers","following_url":"https://api.github.com/users/hmoco/following{/other_user}","gists_url":"https://api.github.com/users/hmoco/gists{/gist_id}","starred_url":"https://api.github.com/users/hmoco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmoco/subscriptions","organizations_url":"https://api.github.com/users/hmoco/orgs","repos_url":"https://api.github.com/users/hmoco/repos","events_url":"https://api.github.com/users/hmoco/events{/privacy}","received_events_url":"https://api.github.com/users/hmoco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hmoco/ember-osf","description":"","fork":true,"url":"https://api.github.com/repos/hmoco/ember-osf","forks_url":"https://api.github.com/repos/hmoco/ember-osf/forks","keys_url":"https://api.github.com/repos/hmoco/ember-osf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmoco/ember-osf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmoco/ember-osf/teams","hooks_url":"https://api.github.com/repos/hmoco/ember-osf/hooks","issue_events_url":"https://api.github.com/repos/hmoco/ember-osf/issues/events{/number}","events_url":"https://api.github.com/repos/hmoco/ember-osf/events","assignees_url":"https://api.github.com/repos/hmoco/ember-osf/assignees{/user}","branches_url":"https://api.github.com/repos/hmoco/ember-osf/branches{/branch}","tags_url":"https://api.github.com/repos/hmoco/ember-osf/tags","blobs_url":"https://api.github.com/repos/hmoco/ember-osf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmoco/ember-osf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmoco/ember-osf/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmoco/ember-osf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmoco/ember-osf/statuses/{sha}","languages_url":"https://api.github.com/repos/hmoco/ember-osf/languages","stargazers_url":"https://api.github.com/repos/hmoco/ember-osf/stargazers","contributors_url":"https://api.github.com/repos/hmoco/ember-osf/contributors","subscribers_url":"https://api.github.com/repos/hmoco/ember-osf/subscribers","subscription_url":"https://api.github.com/repos/hmoco/ember-osf/subscription","commits_url":"https://api.github.com/repos/hmoco/ember-osf/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmoco/ember-osf/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmoco/ember-osf/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmoco/ember-osf/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmoco/ember-osf/contents/{+path}","compare_url":"https://api.github.com/repos/hmoco/ember-osf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmoco/ember-osf/merges","archive_url":"https://api.github.com/repos/hmoco/ember-osf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmoco/ember-osf/downloads","issues_url":"https://api.github.com/repos/hmoco/ember-osf/issues{/number}","pulls_url":"https://api.github.com/repos/hmoco/ember-osf/pulls{/number}","milestones_url":"https://api.github.com/repos/hmoco/ember-osf/milestones{/number}","notifications_url":"https://api.github.com/repos/hmoco/ember-osf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmoco/ember-osf/labels{/name}","releases_url":"https://api.github.com/repos/hmoco/ember-osf/releases{/id}","deployments_url":"https://api.github.com/repos/hmoco/ember-osf/deployments","created_at":"2016-05-06T16:56:05Z","updated_at":"2016-05-19T19:28:19Z","pushed_at":"2016-06-20T19:24:56Z","git_url":"git://github.com/hmoco/ember-osf.git","ssh_url":"git@github.com:hmoco/ember-osf.git","clone_url":"https://github.com/hmoco/ember-osf.git","svn_url":"https://github.com/hmoco/ember-osf","homepage":null,"size":604,"stargazers_count":2,"watchers_count":2,"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":2,"default_branch":"develop"}},"base":{"label":"CenterForOpenScience:develop","ref":"develop","sha":"c38bfb8340d34de026c9ea6b98724a554e4b5d28","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":55632427,"name":"ember-osf","full_name":"CenterForOpenScience/ember-osf","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/ember-osf","description":"","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/ember-osf","forks_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/releases{/id}","deployments_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf/deployments","created_at":"2016-04-06T18:51:35Z","updated_at":"2016-06-06T22:53:03Z","pushed_at":"2016-06-20T19:24:57Z","git_url":"git://github.com/CenterForOpenScience/ember-osf.git","ssh_url":"git@github.com:CenterForOpenScience/ember-osf.git","clone_url":"https://github.com/CenterForOpenScience/ember-osf.git","svn_url":"https://github.com/CenterForOpenScience/ember-osf","homepage":null,"size":898,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":10,"forks":10,"open_issues":10,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf/pulls/72"},"html":{"href":"https://github.com/CenterForOpenScience/ember-osf/pull/72"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf/issues/72"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf/statuses/6fa9714d3265d2f494ea722687642026beb16780"}}}}
{"actor":{"display_login":"samchrisinger"}}