{"action":"created","comment":{"url":"https://api.github.com/repos/jupyter/jupyterlab/pulls/comments/77852458","id":77852458,"diff_hunk":"@@ -208,19 +208,13 @@ class FileBrowserModel implements IDisposable {\n    * Download a file.\n    *\n    * @param - path - The path of the file to be downloaded.\n-   *\n-   * @returns - A promise which resolves to the file contents.\n    */\n-  download(path: string): Promise<IContents.IModel> {\n-    let normalizePath = Private.normalizePath;\n-    path = normalizePath(this._model.path, path);\n-    return this._manager.contents.get(path, { content: true }).then(contents => {\n-      let element = document.createElement('a');\n-      element.setAttribute('href', 'data:text/text;charset=utf-8,' +      encodeURI(contents.content));\n-      element.setAttribute('download', contents.name);\n-      element.click();\n-      return contents;\n-    });\n+  download(path: string): void {\n+    let url = this._manager.contents.getDownloadUrl(path);\n+    let element = document.createElement('a');\n+    element.setAttribute('href', url);\n+    element.setAttribute('download', '');\n+    element.click();","path":"src/filebrowser/model.ts","position":22,"original_position":22,"commit_id":"c57284e31900634c4f744ad72103ef75b2ecce37","original_commit_id":"c57284e31900634c4f744ad72103ef75b2ecce37","user":{"login":"ellisonbg","id":27600,"avatar_url":"https://avatars.githubusercontent.com/u/27600?v=3","gravatar_id":"","url":"https://api.github.com/users/ellisonbg","html_url":"https://github.com/ellisonbg","followers_url":"https://api.github.com/users/ellisonbg/followers","following_url":"https://api.github.com/users/ellisonbg/following{/other_user}","gists_url":"https://api.github.com/users/ellisonbg/gists{/gist_id}","starred_url":"https://api.github.com/users/ellisonbg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ellisonbg/subscriptions","organizations_url":"https://api.github.com/users/ellisonbg/orgs","repos_url":"https://api.github.com/users/ellisonbg/repos","events_url":"https://api.github.com/users/ellisonbg/events{/privacy}","received_events_url":"https://api.github.com/users/ellisonbg/received_events","type":"User","site_admin":false},"body":"Ahh, missed that. Ready for merging then.","created_at":"2016-09-07T16:00:29Z","updated_at":"2016-09-07T16:00:29Z","html_url":"https://github.com/jupyter/jupyterlab/pull/838#discussion_r77852458","pull_request_url":"https://api.github.com/repos/jupyter/jupyterlab/pulls/838","_links":{"self":{"href":"https://api.github.com/repos/jupyter/jupyterlab/pulls/comments/77852458"},"html":{"href":"https://github.com/jupyter/jupyterlab/pull/838#discussion_r77852458"},"pull_request":{"href":"https://api.github.com/repos/jupyter/jupyterlab/pulls/838"}}},"pull_request":{"url":"https://api.github.com/repos/jupyter/jupyterlab/pulls/838","id":83844224,"html_url":"https://github.com/jupyter/jupyterlab/pull/838","diff_url":"https://github.com/jupyter/jupyterlab/pull/838.diff","patch_url":"https://github.com/jupyter/jupyterlab/pull/838.patch","issue_url":"https://api.github.com/repos/jupyter/jupyterlab/issues/838","number":838,"state":"open","locked":false,"title":"Download files directly from the server","user":{"login":"jasongrout","id":192614,"avatar_url":"https://avatars.githubusercontent.com/u/192614?v=3","gravatar_id":"","url":"https://api.github.com/users/jasongrout","html_url":"https://github.com/jasongrout","followers_url":"https://api.github.com/users/jasongrout/followers","following_url":"https://api.github.com/users/jasongrout/following{/other_user}","gists_url":"https://api.github.com/users/jasongrout/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongrout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongrout/subscriptions","organizations_url":"https://api.github.com/users/jasongrout/orgs","repos_url":"https://api.github.com/users/jasongrout/repos","events_url":"https://api.github.com/users/jasongrout/events{/privacy}","received_events_url":"https://api.github.com/users/jasongrout/received_events","type":"User","site_admin":false},"body":"Fixes #817.","created_at":"2016-09-02T18:21:37Z","updated_at":"2016-09-07T16:00:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eed2c187282db3092e518c165fdf2adf399f902e","assignee":{"login":"jasongrout","id":192614,"avatar_url":"https://avatars.githubusercontent.com/u/192614?v=3","gravatar_id":"","url":"https://api.github.com/users/jasongrout","html_url":"https://github.com/jasongrout","followers_url":"https://api.github.com/users/jasongrout/followers","following_url":"https://api.github.com/users/jasongrout/following{/other_user}","gists_url":"https://api.github.com/users/jasongrout/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongrout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongrout/subscriptions","organizations_url":"https://api.github.com/users/jasongrout/orgs","repos_url":"https://api.github.com/users/jasongrout/repos","events_url":"https://api.github.com/users/jasongrout/events{/privacy}","received_events_url":"https://api.github.com/users/jasongrout/received_events","type":"User","site_admin":false},"assignees":[{"login":"jasongrout","id":192614,"avatar_url":"https://avatars.githubusercontent.com/u/192614?v=3","gravatar_id":"","url":"https://api.github.com/users/jasongrout","html_url":"https://github.com/jasongrout","followers_url":"https://api.github.com/users/jasongrout/followers","following_url":"https://api.github.com/users/jasongrout/following{/other_user}","gists_url":"https://api.github.com/users/jasongrout/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongrout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongrout/subscriptions","organizations_url":"https://api.github.com/users/jasongrout/orgs","repos_url":"https://api.github.com/users/jasongrout/repos","events_url":"https://api.github.com/users/jasongrout/events{/privacy}","received_events_url":"https://api.github.com/users/jasongrout/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/jupyter/jupyterlab/milestones/1","html_url":"https://github.com/jupyter/jupyterlab/milestones/0.90","labels_url":"https://api.github.com/repos/jupyter/jupyterlab/milestones/1/labels","id":1866462,"number":1,"title":"0.90","description":"A version of JupyterLab that is reasonably feature-complete and stable enough to be usable for day-to-day work. Targeted to early adopters and advanced users who are willing to put up with some rough edges and a few missing features and small regressions.\r\n\r\nThis is a marker for us to hit first; we'll then push out a series of 0.91, 0.92, ..., 0.9X releases until we've satisfied the [Milestone 1.0](https://github.com/jupyter/jupyterlab/milestones/2) criteria.","creator":{"login":"fperez","id":57394,"avatar_url":"https://avatars.githubusercontent.com/u/57394?v=3","gravatar_id":"","url":"https://api.github.com/users/fperez","html_url":"https://github.com/fperez","followers_url":"https://api.github.com/users/fperez/followers","following_url":"https://api.github.com/users/fperez/following{/other_user}","gists_url":"https://api.github.com/users/fperez/gists{/gist_id}","starred_url":"https://api.github.com/users/fperez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fperez/subscriptions","organizations_url":"https://api.github.com/users/fperez/orgs","repos_url":"https://api.github.com/users/fperez/repos","events_url":"https://api.github.com/users/fperez/events{/privacy}","received_events_url":"https://api.github.com/users/fperez/received_events","type":"User","site_admin":false},"open_issues":49,"closed_issues":137,"state":"open","created_at":"2016-07-06T00:50:01Z","updated_at":"2016-09-06T19:43:58Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/jupyter/jupyterlab/pulls/838/commits","review_comments_url":"https://api.github.com/repos/jupyter/jupyterlab/pulls/838/comments","review_comment_url":"https://api.github.com/repos/jupyter/jupyterlab/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jupyter/jupyterlab/issues/838/comments","statuses_url":"https://api.github.com/repos/jupyter/jupyterlab/statuses/c57284e31900634c4f744ad72103ef75b2ecce37","head":{"label":"jasongrout:download","ref":"download","sha":"c57284e31900634c4f744ad72103ef75b2ecce37","user":{"login":"jasongrout","id":192614,"avatar_url":"https://avatars.githubusercontent.com/u/192614?v=3","gravatar_id":"","url":"https://api.github.com/users/jasongrout","html_url":"https://github.com/jasongrout","followers_url":"https://api.github.com/users/jasongrout/followers","following_url":"https://api.github.com/users/jasongrout/following{/other_user}","gists_url":"https://api.github.com/users/jasongrout/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongrout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongrout/subscriptions","organizations_url":"https://api.github.com/users/jasongrout/orgs","repos_url":"https://api.github.com/users/jasongrout/repos","events_url":"https://api.github.com/users/jasongrout/events{/privacy}","received_events_url":"https://api.github.com/users/jasongrout/received_events","type":"User","site_admin":false},"repo":{"id":60541761,"name":"jupyterlab","full_name":"jasongrout/jupyterlab","owner":{"login":"jasongrout","id":192614,"avatar_url":"https://avatars.githubusercontent.com/u/192614?v=3","gravatar_id":"","url":"https://api.github.com/users/jasongrout","html_url":"https://github.com/jasongrout","followers_url":"https://api.github.com/users/jasongrout/followers","following_url":"https://api.github.com/users/jasongrout/following{/other_user}","gists_url":"https://api.github.com/users/jasongrout/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongrout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongrout/subscriptions","organizations_url":"https://api.github.com/users/jasongrout/orgs","repos_url":"https://api.github.com/users/jasongrout/repos","events_url":"https://api.github.com/users/jasongrout/events{/privacy}","received_events_url":"https://api.github.com/users/jasongrout/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jasongrout/jupyterlab","description":"JupyterLab computational environment","fork":true,"url":"https://api.github.com/repos/jasongrout/jupyterlab","forks_url":"https://api.github.com/repos/jasongrout/jupyterlab/forks","keys_url":"https://api.github.com/repos/jasongrout/jupyterlab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jasongrout/jupyterlab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jasongrout/jupyterlab/teams","hooks_url":"https://api.github.com/repos/jasongrout/jupyterlab/hooks","issue_events_url":"https://api.github.com/repos/jasongrout/jupyterlab/issues/events{/number}","events_url":"https://api.github.com/repos/jasongrout/jupyterlab/events","assignees_url":"https://api.github.com/repos/jasongrout/jupyterlab/assignees{/user}","branches_url":"https://api.github.com/repos/jasongrout/jupyterlab/branches{/branch}","tags_url":"https://api.github.com/repos/jasongrout/jupyterlab/tags","blobs_url":"https://api.github.com/repos/jasongrout/jupyterlab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jasongrout/jupyterlab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jasongrout/jupyterlab/git/refs{/sha}","trees_url":"https://api.github.com/repos/jasongrout/jupyterlab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jasongrout/jupyterlab/statuses/{sha}","languages_url":"https://api.github.com/repos/jasongrout/jupyterlab/languages","stargazers_url":"https://api.github.com/repos/jasongrout/jupyterlab/stargazers","contributors_url":"https://api.github.com/repos/jasongrout/jupyterlab/contributors","subscribers_url":"https://api.github.com/repos/jasongrout/jupyterlab/subscribers","subscription_url":"https://api.github.com/repos/jasongrout/jupyterlab/subscription","commits_url":"https://api.github.com/repos/jasongrout/jupyterlab/commits{/sha}","git_commits_url":"https://api.github.com/repos/jasongrout/jupyterlab/git/commits{/sha}","comments_url":"https://api.github.com/repos/jasongrout/jupyterlab/comments{/number}","issue_comment_url":"https://api.github.com/repos/jasongrout/jupyterlab/issues/comments{/number}","contents_url":"https://api.github.com/repos/jasongrout/jupyterlab/contents/{+path}","compare_url":"https://api.github.com/repos/jasongrout/jupyterlab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jasongrout/jupyterlab/merges","archive_url":"https://api.github.com/repos/jasongrout/jupyterlab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jasongrout/jupyterlab/downloads","issues_url":"https://api.github.com/repos/jasongrout/jupyterlab/issues{/number}","pulls_url":"https://api.github.com/repos/jasongrout/jupyterlab/pulls{/number}","milestones_url":"https://api.github.com/repos/jasongrout/jupyterlab/milestones{/number}","notifications_url":"https://api.github.com/repos/jasongrout/jupyterlab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jasongrout/jupyterlab/labels{/name}","releases_url":"https://api.github.com/repos/jasongrout/jupyterlab/releases{/id}","deployments_url":"https://api.github.com/repos/jasongrout/jupyterlab/deployments","created_at":"2016-06-06T16:06:40Z","updated_at":"2016-06-06T16:06:41Z","pushed_at":"2016-09-02T22:04:25Z","git_url":"git://github.com/jasongrout/jupyterlab.git","ssh_url":"git@github.com:jasongrout/jupyterlab.git","clone_url":"https://github.com/jasongrout/jupyterlab.git","svn_url":"https://github.com/jasongrout/jupyterlab","homepage":null,"size":37603,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jupyter:master","ref":"master","sha":"f1842635474c759f059eb18c58b2959438b4bce7","user":{"login":"jupyter","id":7388996,"avatar_url":"https://avatars.githubusercontent.com/u/7388996?v=3","gravatar_id":"","url":"https://api.github.com/users/jupyter","html_url":"https://github.com/jupyter","followers_url":"https://api.github.com/users/jupyter/followers","following_url":"https://api.github.com/users/jupyter/following{/other_user}","gists_url":"https://api.github.com/users/jupyter/gists{/gist_id}","starred_url":"https://api.github.com/users/jupyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupyter/subscriptions","organizations_url":"https://api.github.com/users/jupyter/orgs","repos_url":"https://api.github.com/users/jupyter/repos","events_url":"https://api.github.com/users/jupyter/events{/privacy}","received_events_url":"https://api.github.com/users/jupyter/received_events","type":"Organization","site_admin":false},"repo":{"id":60374819,"name":"jupyterlab","full_name":"jupyter/jupyterlab","owner":{"login":"jupyter","id":7388996,"avatar_url":"https://avatars.githubusercontent.com/u/7388996?v=3","gravatar_id":"","url":"https://api.github.com/users/jupyter","html_url":"https://github.com/jupyter","followers_url":"https://api.github.com/users/jupyter/followers","following_url":"https://api.github.com/users/jupyter/following{/other_user}","gists_url":"https://api.github.com/users/jupyter/gists{/gist_id}","starred_url":"https://api.github.com/users/jupyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupyter/subscriptions","organizations_url":"https://api.github.com/users/jupyter/orgs","repos_url":"https://api.github.com/users/jupyter/repos","events_url":"https://api.github.com/users/jupyter/events{/privacy}","received_events_url":"https://api.github.com/users/jupyter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jupyter/jupyterlab","description":"JupyterLab computational environment. This is a very early preview, and is not suitable for general usage yet.","fork":false,"url":"https://api.github.com/repos/jupyter/jupyterlab","forks_url":"https://api.github.com/repos/jupyter/jupyterlab/forks","keys_url":"https://api.github.com/repos/jupyter/jupyterlab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jupyter/jupyterlab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jupyter/jupyterlab/teams","hooks_url":"https://api.github.com/repos/jupyter/jupyterlab/hooks","issue_events_url":"https://api.github.com/repos/jupyter/jupyterlab/issues/events{/number}","events_url":"https://api.github.com/repos/jupyter/jupyterlab/events","assignees_url":"https://api.github.com/repos/jupyter/jupyterlab/assignees{/user}","branches_url":"https://api.github.com/repos/jupyter/jupyterlab/branches{/branch}","tags_url":"https://api.github.com/repos/jupyter/jupyterlab/tags","blobs_url":"https://api.github.com/repos/jupyter/jupyterlab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jupyter/jupyterlab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jupyter/jupyterlab/git/refs{/sha}","trees_url":"https://api.github.com/repos/jupyter/jupyterlab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jupyter/jupyterlab/statuses/{sha}","languages_url":"https://api.github.com/repos/jupyter/jupyterlab/languages","stargazers_url":"https://api.github.com/repos/jupyter/jupyterlab/stargazers","contributors_url":"https://api.github.com/repos/jupyter/jupyterlab/contributors","subscribers_url":"https://api.github.com/repos/jupyter/jupyterlab/subscribers","subscription_url":"https://api.github.com/repos/jupyter/jupyterlab/subscription","commits_url":"https://api.github.com/repos/jupyter/jupyterlab/commits{/sha}","git_commits_url":"https://api.github.com/repos/jupyter/jupyterlab/git/commits{/sha}","comments_url":"https://api.github.com/repos/jupyter/jupyterlab/comments{/number}","issue_comment_url":"https://api.github.com/repos/jupyter/jupyterlab/issues/comments{/number}","contents_url":"https://api.github.com/repos/jupyter/jupyterlab/contents/{+path}","compare_url":"https://api.github.com/repos/jupyter/jupyterlab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jupyter/jupyterlab/merges","archive_url":"https://api.github.com/repos/jupyter/jupyterlab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jupyter/jupyterlab/downloads","issues_url":"https://api.github.com/repos/jupyter/jupyterlab/issues{/number}","pulls_url":"https://api.github.com/repos/jupyter/jupyterlab/pulls{/number}","milestones_url":"https://api.github.com/repos/jupyter/jupyterlab/milestones{/number}","notifications_url":"https://api.github.com/repos/jupyter/jupyterlab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jupyter/jupyterlab/labels{/name}","releases_url":"https://api.github.com/repos/jupyter/jupyterlab/releases{/id}","deployments_url":"https://api.github.com/repos/jupyter/jupyterlab/deployments","created_at":"2016-06-03T20:09:17Z","updated_at":"2016-09-07T14:36:53Z","pushed_at":"2016-09-07T15:59:32Z","git_url":"git://github.com/jupyter/jupyterlab.git","ssh_url":"git@github.com:jupyter/jupyterlab.git","clone_url":"https://github.com/jupyter/jupyterlab.git","svn_url":"https://github.com/jupyter/jupyterlab","homepage":"","size":35959,"stargazers_count":1078,"watchers_count":1078,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":151,"mirror_url":null,"open_issues_count":174,"forks":151,"open_issues":174,"watchers":1078,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jupyter/jupyterlab/pulls/838"},"html":{"href":"https://github.com/jupyter/jupyterlab/pull/838"},"issue":{"href":"https://api.github.com/repos/jupyter/jupyterlab/issues/838"},"comments":{"href":"https://api.github.com/repos/jupyter/jupyterlab/issues/838/comments"},"review_comments":{"href":"https://api.github.com/repos/jupyter/jupyterlab/pulls/838/comments"},"review_comment":{"href":"https://api.github.com/repos/jupyter/jupyterlab/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jupyter/jupyterlab/pulls/838/commits"},"statuses":{"href":"https://api.github.com/repos/jupyter/jupyterlab/statuses/c57284e31900634c4f744ad72103ef75b2ecce37"}}}}
{"actor":{"display_login":"ellisonbg"}}