{"action":"created","comment":{"url":"https://api.github.com/repos/koding/koding/pulls/comments/90178616","pull_request_review_id":10699960,"id":90178616,"diff_hunk":"@@ -32,10 +44,116 @@ module.exports = class ReadmeView extends kd.View\n \n \n   listenEditorEvents: ->\n+    \n     @on 'FocusToEditor', @editorView.lazyBound 'setFocus', yes\n \n \n   setReadOnly: ->\n \n     @setClass 'readonly'\n     @editorView.aceView.ace.editor.setReadOnly yes\n+    \n+    \n+  setDragClass: ->\n+    \n+    @editorView.aceView.ace.editor.container.classList.add('uploading-files-drag')\n+    \n+    \n+  removeDragClass: ->\n+    \n+    @editorView.aceView.ace.editor.container.classList.remove('uploading-files-drag')\n+    \n+    \n+  openFileInput: () ->\n+    @uploadFileInput.domElement[0].click()\n+    \n+    \n+  setFileInputToUpload: (event)->\n+    \n+    if event.dataTransfer.files.length > 0\n+    \n+      supportedFormats = ['image/jpg','image/jpeg','image/gif','image/png']\n+      \n+      for val in event.dataTransfer.files\n+      \n+        fileSize = val.size\n+        if  0 > supportedFormats.indexOf(val.type) || fileSize > 20000000 || fileSize < 2000","path":"client/stack-editor/lib/editor/readmeview.coffee","position":76,"original_position":76,"commit_id":"1293880a5e08fc3126bdcd6333dd197972e07efa","original_commit_id":"1293880a5e08fc3126bdcd6333dd197972e07efa","user":{"login":"hakankaradis","id":5847301,"avatar_url":"https://avatars.githubusercontent.com/u/5847301?v=3","gravatar_id":"","url":"https://api.github.com/users/hakankaradis","html_url":"https://github.com/hakankaradis","followers_url":"https://api.github.com/users/hakankaradis/followers","following_url":"https://api.github.com/users/hakankaradis/following{/other_user}","gists_url":"https://api.github.com/users/hakankaradis/gists{/gist_id}","starred_url":"https://api.github.com/users/hakankaradis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hakankaradis/subscriptions","organizations_url":"https://api.github.com/users/hakankaradis/orgs","repos_url":"https://api.github.com/users/hakankaradis/repos","events_url":"https://api.github.com/users/hakankaradis/events{/privacy}","received_events_url":"https://api.github.com/users/hakankaradis/received_events","type":"User","site_admin":false},"body":"user `or` instead of `||`","created_at":"2016-11-30T07:05:26Z","updated_at":"2016-11-30T07:14:26Z","html_url":"https://github.com/koding/koding/pull/9823#discussion_r90178616","pull_request_url":"https://api.github.com/repos/koding/koding/pulls/9823","_links":{"self":{"href":"https://api.github.com/repos/koding/koding/pulls/comments/90178616"},"html":{"href":"https://github.com/koding/koding/pull/9823#discussion_r90178616"},"pull_request":{"href":"https://api.github.com/repos/koding/koding/pulls/9823"}}},"pull_request":{"url":"https://api.github.com/repos/koding/koding/pulls/9823","id":95836447,"html_url":"https://github.com/koding/koding/pull/9823","diff_url":"https://github.com/koding/koding/pull/9823.diff","patch_url":"https://github.com/koding/koding/pull/9823.patch","issue_url":"https://api.github.com/repos/koding/koding/issues/9823","number":9823,"state":"open","locked":false,"title":"add upload feature to readme","user":{"login":"xoxoxo","id":1919843,"avatar_url":"https://avatars.githubusercontent.com/u/1919843?v=3","gravatar_id":"","url":"https://api.github.com/users/xoxoxo","html_url":"https://github.com/xoxoxo","followers_url":"https://api.github.com/users/xoxoxo/followers","following_url":"https://api.github.com/users/xoxoxo/following{/other_user}","gists_url":"https://api.github.com/users/xoxoxo/gists{/gist_id}","starred_url":"https://api.github.com/users/xoxoxo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xoxoxo/subscriptions","organizations_url":"https://api.github.com/users/xoxoxo/orgs","repos_url":"https://api.github.com/users/xoxoxo/repos","events_url":"https://api.github.com/users/xoxoxo/events{/privacy}","received_events_url":"https://api.github.com/users/xoxoxo/received_events","type":"User","site_admin":false},"body":"Closes #9171\r\n\r\n### Improvement\r\nThis provides ability for users to upload images into readme.\r\n\r\n![dragndrop](https://cloud.githubusercontent.com/assets/1919843/20742462/37659c8e-b69e-11e6-87b6-affda764cde6.gif)\r\n\r\n<img width=\"1299\" alt=\"screen shot 2016-11-30 at 00 47 42\" src=\"https://cloud.githubusercontent.com/assets/1919843/20742460/376208b2-b69e-11e6-99c5-656168232e4b.png\">\r\n\r\n<img width=\"1194\" alt=\"screen shot 2016-11-30 at 01 43 09\" src=\"https://cloud.githubusercontent.com/assets/1919843/20742500/6500f90e-b69e-11e6-84da-701b8edf3a69.png\">\r\n\r\n\r\n\r\n\r\n\r\n@hakankaradis","created_at":"2016-11-30T06:44:46Z","updated_at":"2016-11-30T07:14:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/koding/koding/pulls/9823/commits","review_comments_url":"https://api.github.com/repos/koding/koding/pulls/9823/comments","review_comment_url":"https://api.github.com/repos/koding/koding/pulls/comments{/number}","comments_url":"https://api.github.com/repos/koding/koding/issues/9823/comments","statuses_url":"https://api.github.com/repos/koding/koding/statuses/1293880a5e08fc3126bdcd6333dd197972e07efa","head":{"label":"xoxoxo:add-upload-to-readme","ref":"add-upload-to-readme","sha":"1293880a5e08fc3126bdcd6333dd197972e07efa","user":{"login":"xoxoxo","id":1919843,"avatar_url":"https://avatars.githubusercontent.com/u/1919843?v=3","gravatar_id":"","url":"https://api.github.com/users/xoxoxo","html_url":"https://github.com/xoxoxo","followers_url":"https://api.github.com/users/xoxoxo/followers","following_url":"https://api.github.com/users/xoxoxo/following{/other_user}","gists_url":"https://api.github.com/users/xoxoxo/gists{/gist_id}","starred_url":"https://api.github.com/users/xoxoxo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xoxoxo/subscriptions","organizations_url":"https://api.github.com/users/xoxoxo/orgs","repos_url":"https://api.github.com/users/xoxoxo/repos","events_url":"https://api.github.com/users/xoxoxo/events{/privacy}","received_events_url":"https://api.github.com/users/xoxoxo/received_events","type":"User","site_admin":false},"repo":{"id":75158560,"name":"koding","full_name":"xoxoxo/koding","owner":{"login":"xoxoxo","id":1919843,"avatar_url":"https://avatars.githubusercontent.com/u/1919843?v=3","gravatar_id":"","url":"https://api.github.com/users/xoxoxo","html_url":"https://github.com/xoxoxo","followers_url":"https://api.github.com/users/xoxoxo/followers","following_url":"https://api.github.com/users/xoxoxo/following{/other_user}","gists_url":"https://api.github.com/users/xoxoxo/gists{/gist_id}","starred_url":"https://api.github.com/users/xoxoxo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xoxoxo/subscriptions","organizations_url":"https://api.github.com/users/xoxoxo/orgs","repos_url":"https://api.github.com/users/xoxoxo/repos","events_url":"https://api.github.com/users/xoxoxo/events{/privacy}","received_events_url":"https://api.github.com/users/xoxoxo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xoxoxo/koding","description":"The Simplest Way to Manage Your Entire Dev Infrastructure!","fork":true,"url":"https://api.github.com/repos/xoxoxo/koding","forks_url":"https://api.github.com/repos/xoxoxo/koding/forks","keys_url":"https://api.github.com/repos/xoxoxo/koding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xoxoxo/koding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xoxoxo/koding/teams","hooks_url":"https://api.github.com/repos/xoxoxo/koding/hooks","issue_events_url":"https://api.github.com/repos/xoxoxo/koding/issues/events{/number}","events_url":"https://api.github.com/repos/xoxoxo/koding/events","assignees_url":"https://api.github.com/repos/xoxoxo/koding/assignees{/user}","branches_url":"https://api.github.com/repos/xoxoxo/koding/branches{/branch}","tags_url":"https://api.github.com/repos/xoxoxo/koding/tags","blobs_url":"https://api.github.com/repos/xoxoxo/koding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xoxoxo/koding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xoxoxo/koding/git/refs{/sha}","trees_url":"https://api.github.com/repos/xoxoxo/koding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xoxoxo/koding/statuses/{sha}","languages_url":"https://api.github.com/repos/xoxoxo/koding/languages","stargazers_url":"https://api.github.com/repos/xoxoxo/koding/stargazers","contributors_url":"https://api.github.com/repos/xoxoxo/koding/contributors","subscribers_url":"https://api.github.com/repos/xoxoxo/koding/subscribers","subscription_url":"https://api.github.com/repos/xoxoxo/koding/subscription","commits_url":"https://api.github.com/repos/xoxoxo/koding/commits{/sha}","git_commits_url":"https://api.github.com/repos/xoxoxo/koding/git/commits{/sha}","comments_url":"https://api.github.com/repos/xoxoxo/koding/comments{/number}","issue_comment_url":"https://api.github.com/repos/xoxoxo/koding/issues/comments{/number}","contents_url":"https://api.github.com/repos/xoxoxo/koding/contents/{+path}","compare_url":"https://api.github.com/repos/xoxoxo/koding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xoxoxo/koding/merges","archive_url":"https://api.github.com/repos/xoxoxo/koding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xoxoxo/koding/downloads","issues_url":"https://api.github.com/repos/xoxoxo/koding/issues{/number}","pulls_url":"https://api.github.com/repos/xoxoxo/koding/pulls{/number}","milestones_url":"https://api.github.com/repos/xoxoxo/koding/milestones{/number}","notifications_url":"https://api.github.com/repos/xoxoxo/koding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xoxoxo/koding/labels{/name}","releases_url":"https://api.github.com/repos/xoxoxo/koding/releases{/id}","deployments_url":"https://api.github.com/repos/xoxoxo/koding/deployments","created_at":"2016-11-30T06:33:41Z","updated_at":"2016-11-30T06:33:53Z","pushed_at":"2016-11-30T06:38:10Z","git_url":"git://github.com/xoxoxo/koding.git","ssh_url":"git@github.com:xoxoxo/koding.git","clone_url":"https://github.com/xoxoxo/koding.git","svn_url":"https://github.com/xoxoxo/koding","homepage":"https://www.koding.com","size":825084,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","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":"koding:master","ref":"master","sha":"92a21a29775125267c9dc1ef7a67d1f3ec33bb1b","user":{"login":"koding","id":1066754,"avatar_url":"https://avatars.githubusercontent.com/u/1066754?v=3","gravatar_id":"","url":"https://api.github.com/users/koding","html_url":"https://github.com/koding","followers_url":"https://api.github.com/users/koding/followers","following_url":"https://api.github.com/users/koding/following{/other_user}","gists_url":"https://api.github.com/users/koding/gists{/gist_id}","starred_url":"https://api.github.com/users/koding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koding/subscriptions","organizations_url":"https://api.github.com/users/koding/orgs","repos_url":"https://api.github.com/users/koding/repos","events_url":"https://api.github.com/users/koding/events{/privacy}","received_events_url":"https://api.github.com/users/koding/received_events","type":"Organization","site_admin":false},"repo":{"id":21317360,"name":"koding","full_name":"koding/koding","owner":{"login":"koding","id":1066754,"avatar_url":"https://avatars.githubusercontent.com/u/1066754?v=3","gravatar_id":"","url":"https://api.github.com/users/koding","html_url":"https://github.com/koding","followers_url":"https://api.github.com/users/koding/followers","following_url":"https://api.github.com/users/koding/following{/other_user}","gists_url":"https://api.github.com/users/koding/gists{/gist_id}","starred_url":"https://api.github.com/users/koding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koding/subscriptions","organizations_url":"https://api.github.com/users/koding/orgs","repos_url":"https://api.github.com/users/koding/repos","events_url":"https://api.github.com/users/koding/events{/privacy}","received_events_url":"https://api.github.com/users/koding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/koding/koding","description":"The Simplest Way to Manage Your Entire Dev Infrastructure!","fork":false,"url":"https://api.github.com/repos/koding/koding","forks_url":"https://api.github.com/repos/koding/koding/forks","keys_url":"https://api.github.com/repos/koding/koding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koding/koding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koding/koding/teams","hooks_url":"https://api.github.com/repos/koding/koding/hooks","issue_events_url":"https://api.github.com/repos/koding/koding/issues/events{/number}","events_url":"https://api.github.com/repos/koding/koding/events","assignees_url":"https://api.github.com/repos/koding/koding/assignees{/user}","branches_url":"https://api.github.com/repos/koding/koding/branches{/branch}","tags_url":"https://api.github.com/repos/koding/koding/tags","blobs_url":"https://api.github.com/repos/koding/koding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koding/koding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koding/koding/git/refs{/sha}","trees_url":"https://api.github.com/repos/koding/koding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koding/koding/statuses/{sha}","languages_url":"https://api.github.com/repos/koding/koding/languages","stargazers_url":"https://api.github.com/repos/koding/koding/stargazers","contributors_url":"https://api.github.com/repos/koding/koding/contributors","subscribers_url":"https://api.github.com/repos/koding/koding/subscribers","subscription_url":"https://api.github.com/repos/koding/koding/subscription","commits_url":"https://api.github.com/repos/koding/koding/commits{/sha}","git_commits_url":"https://api.github.com/repos/koding/koding/git/commits{/sha}","comments_url":"https://api.github.com/repos/koding/koding/comments{/number}","issue_comment_url":"https://api.github.com/repos/koding/koding/issues/comments{/number}","contents_url":"https://api.github.com/repos/koding/koding/contents/{+path}","compare_url":"https://api.github.com/repos/koding/koding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koding/koding/merges","archive_url":"https://api.github.com/repos/koding/koding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koding/koding/downloads","issues_url":"https://api.github.com/repos/koding/koding/issues{/number}","pulls_url":"https://api.github.com/repos/koding/koding/pulls{/number}","milestones_url":"https://api.github.com/repos/koding/koding/milestones{/number}","notifications_url":"https://api.github.com/repos/koding/koding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koding/koding/labels{/name}","releases_url":"https://api.github.com/repos/koding/koding/releases{/id}","deployments_url":"https://api.github.com/repos/koding/koding/deployments","created_at":"2014-06-29T05:46:24Z","updated_at":"2016-11-28T15:14:39Z","pushed_at":"2016-11-30T06:44:47Z","git_url":"git://github.com/koding/koding.git","ssh_url":"git@github.com:koding/koding.git","clone_url":"https://github.com/koding/koding.git","svn_url":"https://github.com/koding/koding","homepage":"https://www.koding.com","size":825084,"stargazers_count":464,"watchers_count":464,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":65,"mirror_url":null,"open_issues_count":261,"forks":65,"open_issues":261,"watchers":464,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/koding/koding/pulls/9823"},"html":{"href":"https://github.com/koding/koding/pull/9823"},"issue":{"href":"https://api.github.com/repos/koding/koding/issues/9823"},"comments":{"href":"https://api.github.com/repos/koding/koding/issues/9823/comments"},"review_comments":{"href":"https://api.github.com/repos/koding/koding/pulls/9823/comments"},"review_comment":{"href":"https://api.github.com/repos/koding/koding/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/koding/koding/pulls/9823/commits"},"statuses":{"href":"https://api.github.com/repos/koding/koding/statuses/1293880a5e08fc3126bdcd6333dd197972e07efa"}}}}
{"actor":{"display_login":"hakankaradis"}}