{"action":"created","comment":{"url":"https://api.github.com/repos/behance/BeFF/pulls/comments/41202236","id":41202236,"diff_hunk":"@@ -426,11 +427,38 @@ define([\n           fileMap[data.name].promise.resolve(data);\n         })\n         .on('allComplete', function() {\n-          uploader.destroy();\n+          this.destroy();\n         });\n+      }.bind(this));\n+    }\n+  }, {\n+    promise: function(options) {\n+      var uploader;\n \n-        uploader.choose();\n-      });\n+      try {\n+        uploader = this.init(options);\n+      } catch (e) {\n+        return Promise.reject(e);\n+      }\n+\n+      var promise = uploader.promisify();\n+      uploader.choose();\n+\n+      return promise;\n+    },\n+    promiseFromFiles: function(options, blobs) {","path":"Component/CloudUploader.js","position":86,"original_position":86,"commit_id":"e63e0b92ab0cc1055fa6e20d85f2142c4037b9b9","original_commit_id":"e63e0b92ab0cc1055fa6e20d85f2142c4037b9b9","user":{"login":"mrjoelkemp","id":865203,"avatar_url":"https://avatars.githubusercontent.com/u/865203?v=3","gravatar_id":"","url":"https://api.github.com/users/mrjoelkemp","html_url":"https://github.com/mrjoelkemp","followers_url":"https://api.github.com/users/mrjoelkemp/followers","following_url":"https://api.github.com/users/mrjoelkemp/following{/other_user}","gists_url":"https://api.github.com/users/mrjoelkemp/gists{/gist_id}","starred_url":"https://api.github.com/users/mrjoelkemp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrjoelkemp/subscriptions","organizations_url":"https://api.github.com/users/mrjoelkemp/orgs","repos_url":"https://api.github.com/users/mrjoelkemp/repos","events_url":"https://api.github.com/users/mrjoelkemp/events{/privacy}","received_events_url":"https://api.github.com/users/mrjoelkemp/received_events","type":"User","site_admin":false},"body":"The code for both methods is identical except for the action to take","created_at":"2015-10-05T21:48:04Z","updated_at":"2015-10-05T21:48:04Z","html_url":"https://github.com/behance/BeFF/pull/113#discussion_r41202236","pull_request_url":"https://api.github.com/repos/behance/BeFF/pulls/113","_links":{"self":{"href":"https://api.github.com/repos/behance/BeFF/pulls/comments/41202236"},"html":{"href":"https://github.com/behance/BeFF/pull/113#discussion_r41202236"},"pull_request":{"href":"https://api.github.com/repos/behance/BeFF/pulls/113"}}},"pull_request":{"url":"https://api.github.com/repos/behance/BeFF/pulls/113","id":46460542,"html_url":"https://github.com/behance/BeFF/pull/113","diff_url":"https://github.com/behance/BeFF/pull/113.diff","patch_url":"https://github.com/behance/BeFF/pull/113.patch","issue_url":"https://api.github.com/repos/behance/BeFF/issues/113","number":113,"state":"open","locked":false,"title":"Component/CloudUploader: support uploading an array of blobs","user":{"login":"hzoo","id":588473,"avatar_url":"https://avatars.githubusercontent.com/u/588473?v=3","gravatar_id":"","url":"https://api.github.com/users/hzoo","html_url":"https://github.com/hzoo","followers_url":"https://api.github.com/users/hzoo/followers","following_url":"https://api.github.com/users/hzoo/following{/other_user}","gists_url":"https://api.github.com/users/hzoo/gists{/gist_id}","starred_url":"https://api.github.com/users/hzoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzoo/subscriptions","organizations_url":"https://api.github.com/users/hzoo/orgs","repos_url":"https://api.github.com/users/hzoo/repos","events_url":"https://api.github.com/users/hzoo/events{/privacy}","received_events_url":"https://api.github.com/users/hzoo/received_events","type":"User","site_admin":false},"body":"https://github.com/behance/issues/issues/3567\r\n\r\nSending the lightroom image blobs through cloudthrough\r\n\r\nPoet code will be something like\r\n\r\n```js\r\nexport function uploadBlobs(config, blobs, options) {\r\n  return CloudUploader.promiseBlobs(getOptions(config, options), blobs);\r\n}\r\n\r\nexport function upload(config, options) {\r\n  return CloudUploader.promise(getOptions(config, options));\r\n}\r\n```","created_at":"2015-09-30T21:41:32Z","updated_at":"2015-10-05T21:48:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"50fce7f1aa53a192c337e0c6c5bcdc5bd4a16f79","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/behance/BeFF/pulls/113/commits","review_comments_url":"https://api.github.com/repos/behance/BeFF/pulls/113/comments","review_comment_url":"https://api.github.com/repos/behance/BeFF/pulls/comments{/number}","comments_url":"https://api.github.com/repos/behance/BeFF/issues/113/comments","statuses_url":"https://api.github.com/repos/behance/BeFF/statuses/e63e0b92ab0cc1055fa6e20d85f2142c4037b9b9","head":{"label":"hzoo:behance-3567","ref":"behance-3567","sha":"e63e0b92ab0cc1055fa6e20d85f2142c4037b9b9","user":{"login":"hzoo","id":588473,"avatar_url":"https://avatars.githubusercontent.com/u/588473?v=3","gravatar_id":"","url":"https://api.github.com/users/hzoo","html_url":"https://github.com/hzoo","followers_url":"https://api.github.com/users/hzoo/followers","following_url":"https://api.github.com/users/hzoo/following{/other_user}","gists_url":"https://api.github.com/users/hzoo/gists{/gist_id}","starred_url":"https://api.github.com/users/hzoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzoo/subscriptions","organizations_url":"https://api.github.com/users/hzoo/orgs","repos_url":"https://api.github.com/users/hzoo/repos","events_url":"https://api.github.com/users/hzoo/events{/privacy}","received_events_url":"https://api.github.com/users/hzoo/received_events","type":"User","site_admin":false},"repo":{"id":41099319,"name":"BeFF","full_name":"hzoo/BeFF","owner":{"login":"hzoo","id":588473,"avatar_url":"https://avatars.githubusercontent.com/u/588473?v=3","gravatar_id":"","url":"https://api.github.com/users/hzoo","html_url":"https://github.com/hzoo","followers_url":"https://api.github.com/users/hzoo/followers","following_url":"https://api.github.com/users/hzoo/following{/other_user}","gists_url":"https://api.github.com/users/hzoo/gists{/gist_id}","starred_url":"https://api.github.com/users/hzoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzoo/subscriptions","organizations_url":"https://api.github.com/users/hzoo/orgs","repos_url":"https://api.github.com/users/hzoo/repos","events_url":"https://api.github.com/users/hzoo/events{/privacy}","received_events_url":"https://api.github.com/users/hzoo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hzoo/BeFF","description":"Behance Frontend Framework","fork":true,"url":"https://api.github.com/repos/hzoo/BeFF","forks_url":"https://api.github.com/repos/hzoo/BeFF/forks","keys_url":"https://api.github.com/repos/hzoo/BeFF/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hzoo/BeFF/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hzoo/BeFF/teams","hooks_url":"https://api.github.com/repos/hzoo/BeFF/hooks","issue_events_url":"https://api.github.com/repos/hzoo/BeFF/issues/events{/number}","events_url":"https://api.github.com/repos/hzoo/BeFF/events","assignees_url":"https://api.github.com/repos/hzoo/BeFF/assignees{/user}","branches_url":"https://api.github.com/repos/hzoo/BeFF/branches{/branch}","tags_url":"https://api.github.com/repos/hzoo/BeFF/tags","blobs_url":"https://api.github.com/repos/hzoo/BeFF/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hzoo/BeFF/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hzoo/BeFF/git/refs{/sha}","trees_url":"https://api.github.com/repos/hzoo/BeFF/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hzoo/BeFF/statuses/{sha}","languages_url":"https://api.github.com/repos/hzoo/BeFF/languages","stargazers_url":"https://api.github.com/repos/hzoo/BeFF/stargazers","contributors_url":"https://api.github.com/repos/hzoo/BeFF/contributors","subscribers_url":"https://api.github.com/repos/hzoo/BeFF/subscribers","subscription_url":"https://api.github.com/repos/hzoo/BeFF/subscription","commits_url":"https://api.github.com/repos/hzoo/BeFF/commits{/sha}","git_commits_url":"https://api.github.com/repos/hzoo/BeFF/git/commits{/sha}","comments_url":"https://api.github.com/repos/hzoo/BeFF/comments{/number}","issue_comment_url":"https://api.github.com/repos/hzoo/BeFF/issues/comments{/number}","contents_url":"https://api.github.com/repos/hzoo/BeFF/contents/{+path}","compare_url":"https://api.github.com/repos/hzoo/BeFF/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hzoo/BeFF/merges","archive_url":"https://api.github.com/repos/hzoo/BeFF/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hzoo/BeFF/downloads","issues_url":"https://api.github.com/repos/hzoo/BeFF/issues{/number}","pulls_url":"https://api.github.com/repos/hzoo/BeFF/pulls{/number}","milestones_url":"https://api.github.com/repos/hzoo/BeFF/milestones{/number}","notifications_url":"https://api.github.com/repos/hzoo/BeFF/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hzoo/BeFF/labels{/name}","releases_url":"https://api.github.com/repos/hzoo/BeFF/releases{/id}","created_at":"2015-08-20T14:10:08Z","updated_at":"2015-08-20T14:10:09Z","pushed_at":"2015-10-05T21:43:42Z","git_url":"git://github.com/hzoo/BeFF.git","ssh_url":"git@github.com:hzoo/BeFF.git","clone_url":"https://github.com/hzoo/BeFF.git","svn_url":"https://github.com/hzoo/BeFF","homepage":null,"size":1168,"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":"behance:master","ref":"master","sha":"530b12e099c783f4ee95a750324ab673507803c0","user":{"login":"behance","id":1197743,"avatar_url":"https://avatars.githubusercontent.com/u/1197743?v=3","gravatar_id":"","url":"https://api.github.com/users/behance","html_url":"https://github.com/behance","followers_url":"https://api.github.com/users/behance/followers","following_url":"https://api.github.com/users/behance/following{/other_user}","gists_url":"https://api.github.com/users/behance/gists{/gist_id}","starred_url":"https://api.github.com/users/behance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behance/subscriptions","organizations_url":"https://api.github.com/users/behance/orgs","repos_url":"https://api.github.com/users/behance/repos","events_url":"https://api.github.com/users/behance/events{/privacy}","received_events_url":"https://api.github.com/users/behance/received_events","type":"Organization","site_admin":false},"repo":{"id":19325681,"name":"BeFF","full_name":"behance/BeFF","owner":{"login":"behance","id":1197743,"avatar_url":"https://avatars.githubusercontent.com/u/1197743?v=3","gravatar_id":"","url":"https://api.github.com/users/behance","html_url":"https://github.com/behance","followers_url":"https://api.github.com/users/behance/followers","following_url":"https://api.github.com/users/behance/following{/other_user}","gists_url":"https://api.github.com/users/behance/gists{/gist_id}","starred_url":"https://api.github.com/users/behance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behance/subscriptions","organizations_url":"https://api.github.com/users/behance/orgs","repos_url":"https://api.github.com/users/behance/repos","events_url":"https://api.github.com/users/behance/events{/privacy}","received_events_url":"https://api.github.com/users/behance/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/behance/BeFF","description":"Behance Frontend Framework","fork":false,"url":"https://api.github.com/repos/behance/BeFF","forks_url":"https://api.github.com/repos/behance/BeFF/forks","keys_url":"https://api.github.com/repos/behance/BeFF/keys{/key_id}","collaborators_url":"https://api.github.com/repos/behance/BeFF/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/behance/BeFF/teams","hooks_url":"https://api.github.com/repos/behance/BeFF/hooks","issue_events_url":"https://api.github.com/repos/behance/BeFF/issues/events{/number}","events_url":"https://api.github.com/repos/behance/BeFF/events","assignees_url":"https://api.github.com/repos/behance/BeFF/assignees{/user}","branches_url":"https://api.github.com/repos/behance/BeFF/branches{/branch}","tags_url":"https://api.github.com/repos/behance/BeFF/tags","blobs_url":"https://api.github.com/repos/behance/BeFF/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/behance/BeFF/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/behance/BeFF/git/refs{/sha}","trees_url":"https://api.github.com/repos/behance/BeFF/git/trees{/sha}","statuses_url":"https://api.github.com/repos/behance/BeFF/statuses/{sha}","languages_url":"https://api.github.com/repos/behance/BeFF/languages","stargazers_url":"https://api.github.com/repos/behance/BeFF/stargazers","contributors_url":"https://api.github.com/repos/behance/BeFF/contributors","subscribers_url":"https://api.github.com/repos/behance/BeFF/subscribers","subscription_url":"https://api.github.com/repos/behance/BeFF/subscription","commits_url":"https://api.github.com/repos/behance/BeFF/commits{/sha}","git_commits_url":"https://api.github.com/repos/behance/BeFF/git/commits{/sha}","comments_url":"https://api.github.com/repos/behance/BeFF/comments{/number}","issue_comment_url":"https://api.github.com/repos/behance/BeFF/issues/comments{/number}","contents_url":"https://api.github.com/repos/behance/BeFF/contents/{+path}","compare_url":"https://api.github.com/repos/behance/BeFF/compare/{base}...{head}","merges_url":"https://api.github.com/repos/behance/BeFF/merges","archive_url":"https://api.github.com/repos/behance/BeFF/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/behance/BeFF/downloads","issues_url":"https://api.github.com/repos/behance/BeFF/issues{/number}","pulls_url":"https://api.github.com/repos/behance/BeFF/pulls{/number}","milestones_url":"https://api.github.com/repos/behance/BeFF/milestones{/number}","notifications_url":"https://api.github.com/repos/behance/BeFF/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/behance/BeFF/labels{/name}","releases_url":"https://api.github.com/repos/behance/BeFF/releases{/id}","created_at":"2014-04-30T20:06:04Z","updated_at":"2015-04-05T10:46:56Z","pushed_at":"2015-10-05T21:43:43Z","git_url":"git://github.com/behance/BeFF.git","ssh_url":"git@github.com:behance/BeFF.git","clone_url":"https://github.com/behance/BeFF.git","svn_url":"https://github.com/behance/BeFF","homepage":null,"size":1835,"stargazers_count":4,"watchers_count":4,"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":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/behance/BeFF/pulls/113"},"html":{"href":"https://github.com/behance/BeFF/pull/113"},"issue":{"href":"https://api.github.com/repos/behance/BeFF/issues/113"},"comments":{"href":"https://api.github.com/repos/behance/BeFF/issues/113/comments"},"review_comments":{"href":"https://api.github.com/repos/behance/BeFF/pulls/113/comments"},"review_comment":{"href":"https://api.github.com/repos/behance/BeFF/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/behance/BeFF/pulls/113/commits"},"statuses":{"href":"https://api.github.com/repos/behance/BeFF/statuses/e63e0b92ab0cc1055fa6e20d85f2142c4037b9b9"}}}}