{"action":"created","comment":{"url":"https://api.github.com/repos/mitodl/lore/pulls/comments/32236644","id":32236644,"diff_hunk":"@@ -59,14 +60,15 @@ def save(self, user_id, repo_id):\n         uploaded_file = self.cleaned_data[\"course_file\"]\n \n         # Save the uploaded file into a temp file.\n-        handle, filename = mkstemp(suffix=uploaded_file.ext)\n-        os.close(handle)\n-\n-        with open(filename, 'wb') as temp:\n-            for chunk in uploaded_file:\n-                temp.write(chunk)\n-\n-        import_file.delay(filename, repo_id, user_id)\n+        path = default_storage.save(","path":"ui/forms.py","position":35,"original_position":35,"commit_id":"219db369b1c6b8f44c2ba509d280c3c9185054ae","original_commit_id":"219db369b1c6b8f44c2ba509d280c3c9185054ae","user":{"login":"pwilkins","id":145821,"avatar_url":"https://avatars.githubusercontent.com/u/145821?v=3","gravatar_id":"","url":"https://api.github.com/users/pwilkins","html_url":"https://github.com/pwilkins","followers_url":"https://api.github.com/users/pwilkins/followers","following_url":"https://api.github.com/users/pwilkins/following{/other_user}","gists_url":"https://api.github.com/users/pwilkins/gists{/gist_id}","starred_url":"https://api.github.com/users/pwilkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwilkins/subscriptions","organizations_url":"https://api.github.com/users/pwilkins/orgs","repos_url":"https://api.github.com/users/pwilkins/repos","events_url":"https://api.github.com/users/pwilkins/events{/privacy}","received_events_url":"https://api.github.com/users/pwilkins/received_events","type":"User","site_admin":false},"body":"Is there a limit on the size of the uploaded file?","created_at":"2015-06-11T15:58:40Z","updated_at":"2015-06-11T15:58:40Z","html_url":"https://github.com/mitodl/lore/pull/145#discussion_r32236644","pull_request_url":"https://api.github.com/repos/mitodl/lore/pulls/145","_links":{"self":{"href":"https://api.github.com/repos/mitodl/lore/pulls/comments/32236644"},"html":{"href":"https://github.com/mitodl/lore/pull/145#discussion_r32236644"},"pull_request":{"href":"https://api.github.com/repos/mitodl/lore/pulls/145"}}},"pull_request":{"url":"https://api.github.com/repos/mitodl/lore/pulls/145","id":37308323,"html_url":"https://github.com/mitodl/lore/pull/145","diff_url":"https://github.com/mitodl/lore/pull/145.diff","patch_url":"https://github.com/mitodl/lore/pull/145.patch","issue_url":"https://api.github.com/repos/mitodl/lore/issues/145","number":145,"state":"open","locked":false,"title":"Switch to using django storage instead of raw os calls","user":{"login":"carsongee","id":596029,"avatar_url":"https://avatars.githubusercontent.com/u/596029?v=3","gravatar_id":"","url":"https://api.github.com/users/carsongee","html_url":"https://github.com/carsongee","followers_url":"https://api.github.com/users/carsongee/followers","following_url":"https://api.github.com/users/carsongee/following{/other_user}","gists_url":"https://api.github.com/users/carsongee/gists{/gist_id}","starred_url":"https://api.github.com/users/carsongee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carsongee/subscriptions","organizations_url":"https://api.github.com/users/carsongee/orgs","repos_url":"https://api.github.com/users/carsongee/repos","events_url":"https://api.github.com/users/carsongee/events{/privacy}","received_events_url":"https://api.github.com/users/carsongee/received_events","type":"User","site_admin":false},"body":"Add S3 support for storing files\r\nCloses #109\r\n[Finishes #96309384]","created_at":"2015-06-09T22:43:28Z","updated_at":"2015-06-11T15:58:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c29cb37632fe53077523c564ace67f9132e443b","assignee":{"login":"pwilkins","id":145821,"avatar_url":"https://avatars.githubusercontent.com/u/145821?v=3","gravatar_id":"","url":"https://api.github.com/users/pwilkins","html_url":"https://github.com/pwilkins","followers_url":"https://api.github.com/users/pwilkins/followers","following_url":"https://api.github.com/users/pwilkins/following{/other_user}","gists_url":"https://api.github.com/users/pwilkins/gists{/gist_id}","starred_url":"https://api.github.com/users/pwilkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwilkins/subscriptions","organizations_url":"https://api.github.com/users/pwilkins/orgs","repos_url":"https://api.github.com/users/pwilkins/repos","events_url":"https://api.github.com/users/pwilkins/events{/privacy}","received_events_url":"https://api.github.com/users/pwilkins/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mitodl/lore/pulls/145/commits","review_comments_url":"https://api.github.com/repos/mitodl/lore/pulls/145/comments","review_comment_url":"https://api.github.com/repos/mitodl/lore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mitodl/lore/issues/145/comments","statuses_url":"https://api.github.com/repos/mitodl/lore/statuses/219db369b1c6b8f44c2ba509d280c3c9185054ae","head":{"label":"mitodl:feature/cg/import_storages","ref":"feature/cg/import_storages","sha":"219db369b1c6b8f44c2ba509d280c3c9185054ae","user":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"repo":{"id":34909549,"name":"lore","full_name":"mitodl/lore","owner":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitodl/lore","description":"Learning Object Repository for Education","fork":false,"url":"https://api.github.com/repos/mitodl/lore","forks_url":"https://api.github.com/repos/mitodl/lore/forks","keys_url":"https://api.github.com/repos/mitodl/lore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitodl/lore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitodl/lore/teams","hooks_url":"https://api.github.com/repos/mitodl/lore/hooks","issue_events_url":"https://api.github.com/repos/mitodl/lore/issues/events{/number}","events_url":"https://api.github.com/repos/mitodl/lore/events","assignees_url":"https://api.github.com/repos/mitodl/lore/assignees{/user}","branches_url":"https://api.github.com/repos/mitodl/lore/branches{/branch}","tags_url":"https://api.github.com/repos/mitodl/lore/tags","blobs_url":"https://api.github.com/repos/mitodl/lore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitodl/lore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitodl/lore/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitodl/lore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitodl/lore/statuses/{sha}","languages_url":"https://api.github.com/repos/mitodl/lore/languages","stargazers_url":"https://api.github.com/repos/mitodl/lore/stargazers","contributors_url":"https://api.github.com/repos/mitodl/lore/contributors","subscribers_url":"https://api.github.com/repos/mitodl/lore/subscribers","subscription_url":"https://api.github.com/repos/mitodl/lore/subscription","commits_url":"https://api.github.com/repos/mitodl/lore/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitodl/lore/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitodl/lore/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitodl/lore/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitodl/lore/contents/{+path}","compare_url":"https://api.github.com/repos/mitodl/lore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitodl/lore/merges","archive_url":"https://api.github.com/repos/mitodl/lore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitodl/lore/downloads","issues_url":"https://api.github.com/repos/mitodl/lore/issues{/number}","pulls_url":"https://api.github.com/repos/mitodl/lore/pulls{/number}","milestones_url":"https://api.github.com/repos/mitodl/lore/milestones{/number}","notifications_url":"https://api.github.com/repos/mitodl/lore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitodl/lore/labels{/name}","releases_url":"https://api.github.com/repos/mitodl/lore/releases{/id}","created_at":"2015-05-01T15:34:34Z","updated_at":"2015-06-06T02:45:29Z","pushed_at":"2015-06-11T15:27:02Z","git_url":"git://github.com/mitodl/lore.git","ssh_url":"git@github.com:mitodl/lore.git","clone_url":"https://github.com/mitodl/lore.git","svn_url":"https://github.com/mitodl/lore","homepage":"","size":4278,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":36,"forks":2,"open_issues":36,"watchers":5,"default_branch":"master"}},"base":{"label":"mitodl:master","ref":"master","sha":"50614228d295fddf011406b287af2756a6b8ffe3","user":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"repo":{"id":34909549,"name":"lore","full_name":"mitodl/lore","owner":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitodl/lore","description":"Learning Object Repository for Education","fork":false,"url":"https://api.github.com/repos/mitodl/lore","forks_url":"https://api.github.com/repos/mitodl/lore/forks","keys_url":"https://api.github.com/repos/mitodl/lore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitodl/lore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitodl/lore/teams","hooks_url":"https://api.github.com/repos/mitodl/lore/hooks","issue_events_url":"https://api.github.com/repos/mitodl/lore/issues/events{/number}","events_url":"https://api.github.com/repos/mitodl/lore/events","assignees_url":"https://api.github.com/repos/mitodl/lore/assignees{/user}","branches_url":"https://api.github.com/repos/mitodl/lore/branches{/branch}","tags_url":"https://api.github.com/repos/mitodl/lore/tags","blobs_url":"https://api.github.com/repos/mitodl/lore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitodl/lore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitodl/lore/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitodl/lore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitodl/lore/statuses/{sha}","languages_url":"https://api.github.com/repos/mitodl/lore/languages","stargazers_url":"https://api.github.com/repos/mitodl/lore/stargazers","contributors_url":"https://api.github.com/repos/mitodl/lore/contributors","subscribers_url":"https://api.github.com/repos/mitodl/lore/subscribers","subscription_url":"https://api.github.com/repos/mitodl/lore/subscription","commits_url":"https://api.github.com/repos/mitodl/lore/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitodl/lore/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitodl/lore/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitodl/lore/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitodl/lore/contents/{+path}","compare_url":"https://api.github.com/repos/mitodl/lore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitodl/lore/merges","archive_url":"https://api.github.com/repos/mitodl/lore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitodl/lore/downloads","issues_url":"https://api.github.com/repos/mitodl/lore/issues{/number}","pulls_url":"https://api.github.com/repos/mitodl/lore/pulls{/number}","milestones_url":"https://api.github.com/repos/mitodl/lore/milestones{/number}","notifications_url":"https://api.github.com/repos/mitodl/lore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitodl/lore/labels{/name}","releases_url":"https://api.github.com/repos/mitodl/lore/releases{/id}","created_at":"2015-05-01T15:34:34Z","updated_at":"2015-06-06T02:45:29Z","pushed_at":"2015-06-11T15:27:02Z","git_url":"git://github.com/mitodl/lore.git","ssh_url":"git@github.com:mitodl/lore.git","clone_url":"https://github.com/mitodl/lore.git","svn_url":"https://github.com/mitodl/lore","homepage":"","size":4278,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":36,"forks":2,"open_issues":36,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mitodl/lore/pulls/145"},"html":{"href":"https://github.com/mitodl/lore/pull/145"},"issue":{"href":"https://api.github.com/repos/mitodl/lore/issues/145"},"comments":{"href":"https://api.github.com/repos/mitodl/lore/issues/145/comments"},"review_comments":{"href":"https://api.github.com/repos/mitodl/lore/pulls/145/comments"},"review_comment":{"href":"https://api.github.com/repos/mitodl/lore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mitodl/lore/pulls/145/commits"},"statuses":{"href":"https://api.github.com/repos/mitodl/lore/statuses/219db369b1c6b8f44c2ba509d280c3c9185054ae"}}}}