{"action":"created","comment":{"url":"https://api.github.com/repos/vimc/montagu-api/pulls/comments/145393455","pull_request_review_id":70185550,"id":145393455,"diff_hunk":"@@ -160,30 +139,40 @@ open class ModellingGroupController(context: ControllerContext)\n             .filter { it.name == \"modelling-groups.manage-members\" }\n             .map { it.scope }\n \n-    open fun addBurdenEstimate(context: ActionContext, estimateRepository: BurdenEstimateRepository): String\n+    fun addBurdenEstimatesFromHTMLForm(context: ActionContext, estimateRepository: BurdenEstimateRepository): String\n     {\n         // First check if we're allowed to see this touchstone\n         val path = getValidResponsibilityPath(context, estimateRepository)\n \n-        // Then add the burden estimates\n-        val data = context.csvData<BurdenEstimate>()\n-        return uploadBurdenEstimates(data, estimateRepository, context, path)\n+        val request = context.request\n+        if (request.raw().getAttribute(\"org.eclipse.jetty.multipartConfig\") == null)\n+        {\n+            val multipartConfigElement = MultipartConfigElement(System.getProperty(\"java.io.tmpdir\"))\n+            request.raw().setAttribute(\"org.eclipse.jetty.multipartConfig\", multipartConfigElement)\n+        }\n+\n+        request.raw().getPart(\"file\").inputStream.bufferedReader().use {\n+\n+            // Then add the burden estimates\n+            val data = DataTableDeserializer.deserialize(it.readText(), BurdenEstimate::class, Serializer.instance).toList()\n+            return saveBurdenEstimates(data, estimateRepository, context, path)\n+        }\n     }\n \n-    private fun getValidResponsibilityPath(context: ActionContext, estimateRepository: BurdenEstimateRepository): ResponsibilityPath\n+    open fun addBurdenEstimates(context: ActionContext, estimateRepository: BurdenEstimateRepository): String","path":"src/app/src/main/kotlin/org/vaccineimpact/api/app/controllers/ModellingGroupController.kt","position":87,"original_position":87,"commit_id":"d63898df7e058489d886fc3e6a2c3726c16b6c00","original_commit_id":"d63898df7e058489d886fc3e6a2c3726c16b6c00","user":{"login":"littledice","id":6736820,"avatar_url":"https://avatars3.githubusercontent.com/u/6736820?v=4","gravatar_id":"","url":"https://api.github.com/users/littledice","html_url":"https://github.com/littledice","followers_url":"https://api.github.com/users/littledice/followers","following_url":"https://api.github.com/users/littledice/following{/other_user}","gists_url":"https://api.github.com/users/littledice/gists{/gist_id}","starred_url":"https://api.github.com/users/littledice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/littledice/subscriptions","organizations_url":"https://api.github.com/users/littledice/orgs","repos_url":"https://api.github.com/users/littledice/repos","events_url":"https://api.github.com/users/littledice/events{/privacy}","received_events_url":"https://api.github.com/users/littledice/received_events","type":"User","site_admin":false},"body":"not introduced in this PR, but is there a reason for this to be an open function?","created_at":"2017-10-18T12:07:14Z","updated_at":"2017-10-18T12:15:31Z","html_url":"https://github.com/vimc/montagu-api/pull/85#discussion_r145393455","pull_request_url":"https://api.github.com/repos/vimc/montagu-api/pulls/85","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/vimc/montagu-api/pulls/comments/145393455"},"html":{"href":"https://github.com/vimc/montagu-api/pull/85#discussion_r145393455"},"pull_request":{"href":"https://api.github.com/repos/vimc/montagu-api/pulls/85"}}},"pull_request":{"url":"https://api.github.com/repos/vimc/montagu-api/pulls/85","id":147278358,"html_url":"https://github.com/vimc/montagu-api/pull/85","diff_url":"https://github.com/vimc/montagu-api/pull/85.diff","patch_url":"https://github.com/vimc/montagu-api/pull/85.patch","issue_url":"https://api.github.com/repos/vimc/montagu-api/issues/85","number":85,"state":"open","locked":false,"title":"Stream CSV data to browser","user":{"login":"MartinEden","id":1148055,"avatar_url":"https://avatars3.githubusercontent.com/u/1148055?v=4","gravatar_id":"","url":"https://api.github.com/users/MartinEden","html_url":"https://github.com/MartinEden","followers_url":"https://api.github.com/users/MartinEden/followers","following_url":"https://api.github.com/users/MartinEden/following{/other_user}","gists_url":"https://api.github.com/users/MartinEden/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinEden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinEden/subscriptions","organizations_url":"https://api.github.com/users/MartinEden/orgs","repos_url":"https://api.github.com/users/MartinEden/repos","events_url":"https://api.github.com/users/MartinEden/events{/privacy}","received_events_url":"https://api.github.com/users/MartinEden/received_events","type":"User","site_admin":false},"body":"This is part of the https://vimc.myjetbrains.com/youtrack/issue/VIMC-781 work.","created_at":"2017-10-18T11:47:16Z","updated_at":"2017-10-18T12:15:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4450bbc18017dcdcaf370efaee270fab4d1095b","assignee":{"login":"MartinEden","id":1148055,"avatar_url":"https://avatars3.githubusercontent.com/u/1148055?v=4","gravatar_id":"","url":"https://api.github.com/users/MartinEden","html_url":"https://github.com/MartinEden","followers_url":"https://api.github.com/users/MartinEden/followers","following_url":"https://api.github.com/users/MartinEden/following{/other_user}","gists_url":"https://api.github.com/users/MartinEden/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinEden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinEden/subscriptions","organizations_url":"https://api.github.com/users/MartinEden/orgs","repos_url":"https://api.github.com/users/MartinEden/repos","events_url":"https://api.github.com/users/MartinEden/events{/privacy}","received_events_url":"https://api.github.com/users/MartinEden/received_events","type":"User","site_admin":false},"assignees":[{"login":"MartinEden","id":1148055,"avatar_url":"https://avatars3.githubusercontent.com/u/1148055?v=4","gravatar_id":"","url":"https://api.github.com/users/MartinEden","html_url":"https://github.com/MartinEden","followers_url":"https://api.github.com/users/MartinEden/followers","following_url":"https://api.github.com/users/MartinEden/following{/other_user}","gists_url":"https://api.github.com/users/MartinEden/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinEden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinEden/subscriptions","organizations_url":"https://api.github.com/users/MartinEden/orgs","repos_url":"https://api.github.com/users/MartinEden/repos","events_url":"https://api.github.com/users/MartinEden/events{/privacy}","received_events_url":"https://api.github.com/users/MartinEden/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/vimc/montagu-api/pulls/85/commits","review_comments_url":"https://api.github.com/repos/vimc/montagu-api/pulls/85/comments","review_comment_url":"https://api.github.com/repos/vimc/montagu-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vimc/montagu-api/issues/85/comments","statuses_url":"https://api.github.com/repos/vimc/montagu-api/statuses/d63898df7e058489d886fc3e6a2c3726c16b6c00","head":{"label":"vimc:i781_stream_csv","ref":"i781_stream_csv","sha":"d63898df7e058489d886fc3e6a2c3726c16b6c00","user":{"login":"vimc","id":26278316,"avatar_url":"https://avatars1.githubusercontent.com/u/26278316?v=4","gravatar_id":"","url":"https://api.github.com/users/vimc","html_url":"https://github.com/vimc","followers_url":"https://api.github.com/users/vimc/followers","following_url":"https://api.github.com/users/vimc/following{/other_user}","gists_url":"https://api.github.com/users/vimc/gists{/gist_id}","starred_url":"https://api.github.com/users/vimc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vimc/subscriptions","organizations_url":"https://api.github.com/users/vimc/orgs","repos_url":"https://api.github.com/users/vimc/repos","events_url":"https://api.github.com/users/vimc/events{/privacy}","received_events_url":"https://api.github.com/users/vimc/received_events","type":"Organization","site_admin":false},"repo":{"id":85062678,"name":"montagu-api","full_name":"vimc/montagu-api","owner":{"login":"vimc","id":26278316,"avatar_url":"https://avatars1.githubusercontent.com/u/26278316?v=4","gravatar_id":"","url":"https://api.github.com/users/vimc","html_url":"https://github.com/vimc","followers_url":"https://api.github.com/users/vimc/followers","following_url":"https://api.github.com/users/vimc/following{/other_user}","gists_url":"https://api.github.com/users/vimc/gists{/gist_id}","starred_url":"https://api.github.com/users/vimc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vimc/subscriptions","organizations_url":"https://api.github.com/users/vimc/orgs","repos_url":"https://api.github.com/users/vimc/repos","events_url":"https://api.github.com/users/vimc/events{/privacy}","received_events_url":"https://api.github.com/users/vimc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vimc/montagu-api","description":"JSON REST API for providing data access to other applications","fork":false,"url":"https://api.github.com/repos/vimc/montagu-api","forks_url":"https://api.github.com/repos/vimc/montagu-api/forks","keys_url":"https://api.github.com/repos/vimc/montagu-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vimc/montagu-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vimc/montagu-api/teams","hooks_url":"https://api.github.com/repos/vimc/montagu-api/hooks","issue_events_url":"https://api.github.com/repos/vimc/montagu-api/issues/events{/number}","events_url":"https://api.github.com/repos/vimc/montagu-api/events","assignees_url":"https://api.github.com/repos/vimc/montagu-api/assignees{/user}","branches_url":"https://api.github.com/repos/vimc/montagu-api/branches{/branch}","tags_url":"https://api.github.com/repos/vimc/montagu-api/tags","blobs_url":"https://api.github.com/repos/vimc/montagu-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vimc/montagu-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vimc/montagu-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/vimc/montagu-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vimc/montagu-api/statuses/{sha}","languages_url":"https://api.github.com/repos/vimc/montagu-api/languages","stargazers_url":"https://api.github.com/repos/vimc/montagu-api/stargazers","contributors_url":"https://api.github.com/repos/vimc/montagu-api/contributors","subscribers_url":"https://api.github.com/repos/vimc/montagu-api/subscribers","subscription_url":"https://api.github.com/repos/vimc/montagu-api/subscription","commits_url":"https://api.github.com/repos/vimc/montagu-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/vimc/montagu-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/vimc/montagu-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/vimc/montagu-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/vimc/montagu-api/contents/{+path}","compare_url":"https://api.github.com/repos/vimc/montagu-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vimc/montagu-api/merges","archive_url":"https://api.github.com/repos/vimc/montagu-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vimc/montagu-api/downloads","issues_url":"https://api.github.com/repos/vimc/montagu-api/issues{/number}","pulls_url":"https://api.github.com/repos/vimc/montagu-api/pulls{/number}","milestones_url":"https://api.github.com/repos/vimc/montagu-api/milestones{/number}","notifications_url":"https://api.github.com/repos/vimc/montagu-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vimc/montagu-api/labels{/name}","releases_url":"https://api.github.com/repos/vimc/montagu-api/releases{/id}","deployments_url":"https://api.github.com/repos/vimc/montagu-api/deployments","created_at":"2017-03-15T11:05:45Z","updated_at":"2017-04-03T15:58:36Z","pushed_at":"2017-10-18T12:02:41Z","git_url":"git://github.com/vimc/montagu-api.git","ssh_url":"git@github.com:vimc/montagu-api.git","clone_url":"https://github.com/vimc/montagu-api.git","svn_url":"https://github.com/vimc/montagu-api","homepage":null,"size":1925,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"vimc:master","ref":"master","sha":"c6108a639238156d75d129dd0d386d6a6f928af3","user":{"login":"vimc","id":26278316,"avatar_url":"https://avatars1.githubusercontent.com/u/26278316?v=4","gravatar_id":"","url":"https://api.github.com/users/vimc","html_url":"https://github.com/vimc","followers_url":"https://api.github.com/users/vimc/followers","following_url":"https://api.github.com/users/vimc/following{/other_user}","gists_url":"https://api.github.com/users/vimc/gists{/gist_id}","starred_url":"https://api.github.com/users/vimc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vimc/subscriptions","organizations_url":"https://api.github.com/users/vimc/orgs","repos_url":"https://api.github.com/users/vimc/repos","events_url":"https://api.github.com/users/vimc/events{/privacy}","received_events_url":"https://api.github.com/users/vimc/received_events","type":"Organization","site_admin":false},"repo":{"id":85062678,"name":"montagu-api","full_name":"vimc/montagu-api","owner":{"login":"vimc","id":26278316,"avatar_url":"https://avatars1.githubusercontent.com/u/26278316?v=4","gravatar_id":"","url":"https://api.github.com/users/vimc","html_url":"https://github.com/vimc","followers_url":"https://api.github.com/users/vimc/followers","following_url":"https://api.github.com/users/vimc/following{/other_user}","gists_url":"https://api.github.com/users/vimc/gists{/gist_id}","starred_url":"https://api.github.com/users/vimc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vimc/subscriptions","organizations_url":"https://api.github.com/users/vimc/orgs","repos_url":"https://api.github.com/users/vimc/repos","events_url":"https://api.github.com/users/vimc/events{/privacy}","received_events_url":"https://api.github.com/users/vimc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vimc/montagu-api","description":"JSON REST API for providing data access to other applications","fork":false,"url":"https://api.github.com/repos/vimc/montagu-api","forks_url":"https://api.github.com/repos/vimc/montagu-api/forks","keys_url":"https://api.github.com/repos/vimc/montagu-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vimc/montagu-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vimc/montagu-api/teams","hooks_url":"https://api.github.com/repos/vimc/montagu-api/hooks","issue_events_url":"https://api.github.com/repos/vimc/montagu-api/issues/events{/number}","events_url":"https://api.github.com/repos/vimc/montagu-api/events","assignees_url":"https://api.github.com/repos/vimc/montagu-api/assignees{/user}","branches_url":"https://api.github.com/repos/vimc/montagu-api/branches{/branch}","tags_url":"https://api.github.com/repos/vimc/montagu-api/tags","blobs_url":"https://api.github.com/repos/vimc/montagu-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vimc/montagu-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vimc/montagu-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/vimc/montagu-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vimc/montagu-api/statuses/{sha}","languages_url":"https://api.github.com/repos/vimc/montagu-api/languages","stargazers_url":"https://api.github.com/repos/vimc/montagu-api/stargazers","contributors_url":"https://api.github.com/repos/vimc/montagu-api/contributors","subscribers_url":"https://api.github.com/repos/vimc/montagu-api/subscribers","subscription_url":"https://api.github.com/repos/vimc/montagu-api/subscription","commits_url":"https://api.github.com/repos/vimc/montagu-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/vimc/montagu-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/vimc/montagu-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/vimc/montagu-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/vimc/montagu-api/contents/{+path}","compare_url":"https://api.github.com/repos/vimc/montagu-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vimc/montagu-api/merges","archive_url":"https://api.github.com/repos/vimc/montagu-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vimc/montagu-api/downloads","issues_url":"https://api.github.com/repos/vimc/montagu-api/issues{/number}","pulls_url":"https://api.github.com/repos/vimc/montagu-api/pulls{/number}","milestones_url":"https://api.github.com/repos/vimc/montagu-api/milestones{/number}","notifications_url":"https://api.github.com/repos/vimc/montagu-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vimc/montagu-api/labels{/name}","releases_url":"https://api.github.com/repos/vimc/montagu-api/releases{/id}","deployments_url":"https://api.github.com/repos/vimc/montagu-api/deployments","created_at":"2017-03-15T11:05:45Z","updated_at":"2017-04-03T15:58:36Z","pushed_at":"2017-10-18T12:02:41Z","git_url":"git://github.com/vimc/montagu-api.git","ssh_url":"git@github.com:vimc/montagu-api.git","clone_url":"https://github.com/vimc/montagu-api.git","svn_url":"https://github.com/vimc/montagu-api","homepage":null,"size":1925,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vimc/montagu-api/pulls/85"},"html":{"href":"https://github.com/vimc/montagu-api/pull/85"},"issue":{"href":"https://api.github.com/repos/vimc/montagu-api/issues/85"},"comments":{"href":"https://api.github.com/repos/vimc/montagu-api/issues/85/comments"},"review_comments":{"href":"https://api.github.com/repos/vimc/montagu-api/pulls/85/comments"},"review_comment":{"href":"https://api.github.com/repos/vimc/montagu-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vimc/montagu-api/pulls/85/commits"},"statuses":{"href":"https://api.github.com/repos/vimc/montagu-api/statuses/d63898df7e058489d886fc3e6a2c3726c16b6c00"}},"author_association":"OWNER"}}
{"actor":{"display_login":"littledice"}}