{"action":"created","comment":{"url":"https://api.github.com/repos/diaspora/diaspora/pulls/comments/25640268","id":25640268,"diff_hunk":"@@ -314,6 +314,36 @@ def compressed_export\n     ActiveSupport::Gzip.compress Diaspora::Exporter.new(self).execute\n   end\n \n+  ######### Photos export ##################\n+  mount_uploader :exported_photos_file, ExportedPhotos\n+\n+  def queue_export_photos\n+    update exporting_photos: true\n+    Workers::ExportPhotos.perform_async(id)\n+  end\n+\n+  def perform_export_photos!\n+    temp_zip = Tempfile.new([username, '_photos.zip'])\n+    Zip::ZipOutputStream.open(temp_zip.path) do |zos|\n+      photos.each do |photo|\n+        begin\n+          photo_data = photo.unprocessed_image.file.read","path":"app/models/user.rb","position":17,"original_position":17,"commit_id":"5141c0ae95f3d83825fd6d6f6f00ca54f0333cb7","original_commit_id":"5141c0ae95f3d83825fd6d6f6f00ca54f0333cb7","user":{"login":"jhass","id":141294,"avatar_url":"https://avatars.githubusercontent.com/u/141294?v=3","gravatar_id":"","url":"https://api.github.com/users/jhass","html_url":"https://github.com/jhass","followers_url":"https://api.github.com/users/jhass/followers","following_url":"https://api.github.com/users/jhass/following{/other_user}","gists_url":"https://api.github.com/users/jhass/gists{/gist_id}","starred_url":"https://api.github.com/users/jhass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhass/subscriptions","organizations_url":"https://api.github.com/users/jhass/orgs","repos_url":"https://api.github.com/users/jhass/repos","events_url":"https://api.github.com/users/jhass/events{/privacy}","received_events_url":"https://api.github.com/users/jhass/received_events","type":"User","site_admin":false},"body":"I think I fixed the S3 access ;)","created_at":"2015-03-02T21:30:29Z","updated_at":"2015-03-02T21:30:29Z","html_url":"https://github.com/diaspora/diaspora/pull/5685#discussion_r25640268","pull_request_url":"https://api.github.com/repos/diaspora/diaspora/pulls/5685","_links":{"self":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/comments/25640268"},"html":{"href":"https://github.com/diaspora/diaspora/pull/5685#discussion_r25640268"},"pull_request":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/5685"}}},"pull_request":{"url":"https://api.github.com/repos/diaspora/diaspora/pulls/5685","id":29584639,"html_url":"https://github.com/diaspora/diaspora/pull/5685","diff_url":"https://github.com/diaspora/diaspora/pull/5685.diff","patch_url":"https://github.com/diaspora/diaspora/pull/5685.patch","issue_url":"https://api.github.com/repos/diaspora/diaspora/issues/5685","number":5685,"state":"open","locked":false,"title":"Export user photos","user":{"login":"margori","id":1149126,"avatar_url":"https://avatars.githubusercontent.com/u/1149126?v=3","gravatar_id":"","url":"https://api.github.com/users/margori","html_url":"https://github.com/margori","followers_url":"https://api.github.com/users/margori/followers","following_url":"https://api.github.com/users/margori/following{/other_user}","gists_url":"https://api.github.com/users/margori/gists{/gist_id}","starred_url":"https://api.github.com/users/margori/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/margori/subscriptions","organizations_url":"https://api.github.com/users/margori/orgs","repos_url":"https://api.github.com/users/margori/repos","events_url":"https://api.github.com/users/margori/events{/privacy}","received_events_url":"https://api.github.com/users/margori/received_events","type":"User","site_admin":false},"body":"My solution for bug #1802 \r\n\r\nImplemented \"Export photos\" button in user settings, currently disabled.\r\n\r\nI'm using 'zip' files instead of 'tar', 'cause it's widely known and easily handled.","created_at":"2015-02-19T03:20:59Z","updated_at":"2015-03-02T21:30:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1bc20106e8da1c00e261c543a95e55174b1ef3e3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/diaspora/diaspora/pulls/5685/commits","review_comments_url":"https://api.github.com/repos/diaspora/diaspora/pulls/5685/comments","review_comment_url":"https://api.github.com/repos/diaspora/diaspora/pulls/comments{/number}","comments_url":"https://api.github.com/repos/diaspora/diaspora/issues/5685/comments","statuses_url":"https://api.github.com/repos/diaspora/diaspora/statuses/5141c0ae95f3d83825fd6d6f6f00ca54f0333cb7","head":{"label":"margori:1802_export_photos","ref":"1802_export_photos","sha":"5141c0ae95f3d83825fd6d6f6f00ca54f0333cb7","user":{"login":"margori","id":1149126,"avatar_url":"https://avatars.githubusercontent.com/u/1149126?v=3","gravatar_id":"","url":"https://api.github.com/users/margori","html_url":"https://github.com/margori","followers_url":"https://api.github.com/users/margori/followers","following_url":"https://api.github.com/users/margori/following{/other_user}","gists_url":"https://api.github.com/users/margori/gists{/gist_id}","starred_url":"https://api.github.com/users/margori/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/margori/subscriptions","organizations_url":"https://api.github.com/users/margori/orgs","repos_url":"https://api.github.com/users/margori/repos","events_url":"https://api.github.com/users/margori/events{/privacy}","received_events_url":"https://api.github.com/users/margori/received_events","type":"User","site_admin":false},"repo":{"id":27187940,"name":"diaspora","full_name":"margori/diaspora","owner":{"login":"margori","id":1149126,"avatar_url":"https://avatars.githubusercontent.com/u/1149126?v=3","gravatar_id":"","url":"https://api.github.com/users/margori","html_url":"https://github.com/margori","followers_url":"https://api.github.com/users/margori/followers","following_url":"https://api.github.com/users/margori/following{/other_user}","gists_url":"https://api.github.com/users/margori/gists{/gist_id}","starred_url":"https://api.github.com/users/margori/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/margori/subscriptions","organizations_url":"https://api.github.com/users/margori/orgs","repos_url":"https://api.github.com/users/margori/repos","events_url":"https://api.github.com/users/margori/events{/privacy}","received_events_url":"https://api.github.com/users/margori/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/margori/diaspora","description":"Distributed and contextual social networking","fork":true,"url":"https://api.github.com/repos/margori/diaspora","forks_url":"https://api.github.com/repos/margori/diaspora/forks","keys_url":"https://api.github.com/repos/margori/diaspora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/margori/diaspora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/margori/diaspora/teams","hooks_url":"https://api.github.com/repos/margori/diaspora/hooks","issue_events_url":"https://api.github.com/repos/margori/diaspora/issues/events{/number}","events_url":"https://api.github.com/repos/margori/diaspora/events","assignees_url":"https://api.github.com/repos/margori/diaspora/assignees{/user}","branches_url":"https://api.github.com/repos/margori/diaspora/branches{/branch}","tags_url":"https://api.github.com/repos/margori/diaspora/tags","blobs_url":"https://api.github.com/repos/margori/diaspora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/margori/diaspora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/margori/diaspora/git/refs{/sha}","trees_url":"https://api.github.com/repos/margori/diaspora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/margori/diaspora/statuses/{sha}","languages_url":"https://api.github.com/repos/margori/diaspora/languages","stargazers_url":"https://api.github.com/repos/margori/diaspora/stargazers","contributors_url":"https://api.github.com/repos/margori/diaspora/contributors","subscribers_url":"https://api.github.com/repos/margori/diaspora/subscribers","subscription_url":"https://api.github.com/repos/margori/diaspora/subscription","commits_url":"https://api.github.com/repos/margori/diaspora/commits{/sha}","git_commits_url":"https://api.github.com/repos/margori/diaspora/git/commits{/sha}","comments_url":"https://api.github.com/repos/margori/diaspora/comments{/number}","issue_comment_url":"https://api.github.com/repos/margori/diaspora/issues/comments{/number}","contents_url":"https://api.github.com/repos/margori/diaspora/contents/{+path}","compare_url":"https://api.github.com/repos/margori/diaspora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/margori/diaspora/merges","archive_url":"https://api.github.com/repos/margori/diaspora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/margori/diaspora/downloads","issues_url":"https://api.github.com/repos/margori/diaspora/issues{/number}","pulls_url":"https://api.github.com/repos/margori/diaspora/pulls{/number}","milestones_url":"https://api.github.com/repos/margori/diaspora/milestones{/number}","notifications_url":"https://api.github.com/repos/margori/diaspora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/margori/diaspora/labels{/name}","releases_url":"https://api.github.com/repos/margori/diaspora/releases{/id}","created_at":"2014-11-26T17:24:19Z","updated_at":"2014-11-26T17:24:24Z","pushed_at":"2015-03-02T05:51:07Z","git_url":"git://github.com/margori/diaspora.git","ssh_url":"git@github.com:margori/diaspora.git","clone_url":"https://github.com/margori/diaspora.git","svn_url":"https://github.com/margori/diaspora","homepage":"https://diasporafoundation.org/","size":97901,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"diaspora:develop","ref":"develop","sha":"dd45b79a9840d24e43342ebda92ff875bc8f8b0f","user":{"login":"diaspora","id":293207,"avatar_url":"https://avatars.githubusercontent.com/u/293207?v=3","gravatar_id":"","url":"https://api.github.com/users/diaspora","html_url":"https://github.com/diaspora","followers_url":"https://api.github.com/users/diaspora/followers","following_url":"https://api.github.com/users/diaspora/following{/other_user}","gists_url":"https://api.github.com/users/diaspora/gists{/gist_id}","starred_url":"https://api.github.com/users/diaspora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diaspora/subscriptions","organizations_url":"https://api.github.com/users/diaspora/orgs","repos_url":"https://api.github.com/users/diaspora/repos","events_url":"https://api.github.com/users/diaspora/events{/privacy}","received_events_url":"https://api.github.com/users/diaspora/received_events","type":"Organization","site_admin":false},"repo":{"id":911765,"name":"diaspora","full_name":"diaspora/diaspora","owner":{"login":"diaspora","id":293207,"avatar_url":"https://avatars.githubusercontent.com/u/293207?v=3","gravatar_id":"","url":"https://api.github.com/users/diaspora","html_url":"https://github.com/diaspora","followers_url":"https://api.github.com/users/diaspora/followers","following_url":"https://api.github.com/users/diaspora/following{/other_user}","gists_url":"https://api.github.com/users/diaspora/gists{/gist_id}","starred_url":"https://api.github.com/users/diaspora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diaspora/subscriptions","organizations_url":"https://api.github.com/users/diaspora/orgs","repos_url":"https://api.github.com/users/diaspora/repos","events_url":"https://api.github.com/users/diaspora/events{/privacy}","received_events_url":"https://api.github.com/users/diaspora/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/diaspora/diaspora","description":"Distributed and contextual social networking","fork":false,"url":"https://api.github.com/repos/diaspora/diaspora","forks_url":"https://api.github.com/repos/diaspora/diaspora/forks","keys_url":"https://api.github.com/repos/diaspora/diaspora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diaspora/diaspora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diaspora/diaspora/teams","hooks_url":"https://api.github.com/repos/diaspora/diaspora/hooks","issue_events_url":"https://api.github.com/repos/diaspora/diaspora/issues/events{/number}","events_url":"https://api.github.com/repos/diaspora/diaspora/events","assignees_url":"https://api.github.com/repos/diaspora/diaspora/assignees{/user}","branches_url":"https://api.github.com/repos/diaspora/diaspora/branches{/branch}","tags_url":"https://api.github.com/repos/diaspora/diaspora/tags","blobs_url":"https://api.github.com/repos/diaspora/diaspora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diaspora/diaspora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diaspora/diaspora/git/refs{/sha}","trees_url":"https://api.github.com/repos/diaspora/diaspora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diaspora/diaspora/statuses/{sha}","languages_url":"https://api.github.com/repos/diaspora/diaspora/languages","stargazers_url":"https://api.github.com/repos/diaspora/diaspora/stargazers","contributors_url":"https://api.github.com/repos/diaspora/diaspora/contributors","subscribers_url":"https://api.github.com/repos/diaspora/diaspora/subscribers","subscription_url":"https://api.github.com/repos/diaspora/diaspora/subscription","commits_url":"https://api.github.com/repos/diaspora/diaspora/commits{/sha}","git_commits_url":"https://api.github.com/repos/diaspora/diaspora/git/commits{/sha}","comments_url":"https://api.github.com/repos/diaspora/diaspora/comments{/number}","issue_comment_url":"https://api.github.com/repos/diaspora/diaspora/issues/comments{/number}","contents_url":"https://api.github.com/repos/diaspora/diaspora/contents/{+path}","compare_url":"https://api.github.com/repos/diaspora/diaspora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diaspora/diaspora/merges","archive_url":"https://api.github.com/repos/diaspora/diaspora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diaspora/diaspora/downloads","issues_url":"https://api.github.com/repos/diaspora/diaspora/issues{/number}","pulls_url":"https://api.github.com/repos/diaspora/diaspora/pulls{/number}","milestones_url":"https://api.github.com/repos/diaspora/diaspora/milestones{/number}","notifications_url":"https://api.github.com/repos/diaspora/diaspora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diaspora/diaspora/labels{/name}","releases_url":"https://api.github.com/repos/diaspora/diaspora/releases{/id}","created_at":"2010-09-15T05:20:04Z","updated_at":"2015-03-02T18:19:53Z","pushed_at":"2015-03-02T18:19:53Z","git_url":"git://github.com/diaspora/diaspora.git","ssh_url":"git@github.com:diaspora/diaspora.git","clone_url":"https://github.com/diaspora/diaspora.git","svn_url":"https://github.com/diaspora/diaspora","homepage":"https://diasporafoundation.org/","size":249422,"stargazers_count":9812,"watchers_count":9812,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2519,"mirror_url":null,"open_issues_count":423,"forks":2519,"open_issues":423,"watchers":9812,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/5685"},"html":{"href":"https://github.com/diaspora/diaspora/pull/5685"},"issue":{"href":"https://api.github.com/repos/diaspora/diaspora/issues/5685"},"comments":{"href":"https://api.github.com/repos/diaspora/diaspora/issues/5685/comments"},"review_comments":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/5685/comments"},"review_comment":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/5685/commits"},"statuses":{"href":"https://api.github.com/repos/diaspora/diaspora/statuses/5141c0ae95f3d83825fd6d6f6f00ca54f0333cb7"}}}}