{"action":"created","comment":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/comments/183251614","pull_request_review_id":114215215,"id":183251614,"diff_hunk":"@@ -67,6 +76,16 @@ class MediaURLExporter: MediaExporter {\n     /// - Note: You can query the expected type via MediaURLExporter.expectedExport(with:).\n     ///\n     func exportURL(fileURL: URL, onCompletion: @escaping OnMediaExport, onError: @escaping OnExportError) -> Progress {\n+        // Verify the export is permissible\n+        if let urlExportOptions = urlOptions,\n+            !urlExportOptions.allowableFileExtensions.isEmpty,\n+            let fileExtension = fileURL.typeIdentifierFileExtension\n+        {","path":"WordPress/Classes/Utility/Media/MediaURLExporter.swift","position":null,"original_position":38,"commit_id":"5521340536934b37c2df8d40d0c61d45fd4febfc","original_commit_id":"4d8b84f8b1240607ae0de1b4ae7418086f1510a6","user":{"login":"a8c-sab-trial","id":38480191,"avatar_url":"https://avatars3.githubusercontent.com/u/38480191?v=4","gravatar_id":"","url":"https://api.github.com/users/a8c-sab-trial","html_url":"https://github.com/a8c-sab-trial","followers_url":"https://api.github.com/users/a8c-sab-trial/followers","following_url":"https://api.github.com/users/a8c-sab-trial/following{/other_user}","gists_url":"https://api.github.com/users/a8c-sab-trial/gists{/gist_id}","starred_url":"https://api.github.com/users/a8c-sab-trial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a8c-sab-trial/subscriptions","organizations_url":"https://api.github.com/users/a8c-sab-trial/orgs","repos_url":"https://api.github.com/users/a8c-sab-trial/repos","events_url":"https://api.github.com/users/a8c-sab-trial/events{/privacy}","received_events_url":"https://api.github.com/users/a8c-sab-trial/received_events","type":"User","site_admin":false},"body":"Resolved via amended commit.","created_at":"2018-04-22T21:14:35Z","updated_at":"2018-04-22T21:14:35Z","html_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/9161#discussion_r183251614","pull_request_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/9161","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/comments/183251614"},"html":{"href":"https://github.com/wordpress-mobile/WordPress-iOS/pull/9161#discussion_r183251614"},"pull_request":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/9161"}},"in_reply_to_id":183251484},"pull_request":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/9161","id":183294476,"html_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/9161","diff_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/9161.diff","patch_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/9161.patch","issue_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/9161","number":9161,"state":"open","locked":false,"title":"Media Library : Allow document types to be selected in the doc picker","user":{"login":"a8c-sab-trial","id":38480191,"avatar_url":"https://avatars3.githubusercontent.com/u/38480191?v=4","gravatar_id":"","url":"https://api.github.com/users/a8c-sab-trial","html_url":"https://github.com/a8c-sab-trial","followers_url":"https://api.github.com/users/a8c-sab-trial/followers","following_url":"https://api.github.com/users/a8c-sab-trial/following{/other_user}","gists_url":"https://api.github.com/users/a8c-sab-trial/gists{/gist_id}","starred_url":"https://api.github.com/users/a8c-sab-trial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a8c-sab-trial/subscriptions","organizations_url":"https://api.github.com/users/a8c-sab-trial/orgs","repos_url":"https://api.github.com/users/a8c-sab-trial/repos","events_url":"https://api.github.com/users/a8c-sab-trial/events{/privacy}","received_events_url":"https://api.github.com/users/a8c-sab-trial/received_events","type":"User","site_admin":false},"body":"**DRAFT : DO NOT MERGE**\r\n\r\nFixes #9129, which requests support for adding additional document types to the _Media Library_ via `UIDocumentPickerViewController`. It accomplishes this with the following changes:\r\n\r\n- Leverages an existing property on `Blog` called `allowedFileTypes` to identify the file types associated with the blog's plan.\r\n- Extends `Blog` to translate those file types into corresponding [Uniform Type Identifiers](https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_intro/understand_utis_intro.html#//apple_ref/doc/uid/TP40001319-CH201-SW1).\r\n- Enforces `allowedFileTypes` injected into `MediaURLExporter`.\r\n- Defines a new case for `URLExportExpectation`, and propagates support for that.\r\n\r\nTo test:\r\n\r\n- *Manually* attempt to add various files into the _Media Library_ for an assortment of plans & files. Keep in mind that file support differs between [Wordpress.org](https://codex.wordpress.org/Uploading_Files) & [Wordpress.com](https://en.support.wordpress.com/accepted-filetypes/).\r\n- Inspect the screenshots below:\r\n<img width=\"487\" alt=\"9129_docpickerselection_free\" src=\"https://user-images.githubusercontent.com/38480191/39099913-d8733446-4636-11e8-8fd6-a52f015968bc.png\">\r\n<img width=\"487\" alt=\"9129_import_success\" src=\"https://user-images.githubusercontent.com/38480191/39099915-df2f0c42-4636-11e8-9ad6-148dbf2ae54c.png\">","created_at":"2018-04-22T21:10:20Z","updated_at":"2018-04-22T21:14:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e179cf57866af495d095fa705c664cc82e28d3e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/9161/commits","review_comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/9161/comments","review_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/9161/comments","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/5521340536934b37c2df8d40d0c61d45fd4febfc","head":{"label":"a8c-sab-trial:feature/9129-doc-picker-support-more-file-types","ref":"feature/9129-doc-picker-support-more-file-types","sha":"5521340536934b37c2df8d40d0c61d45fd4febfc","user":{"login":"a8c-sab-trial","id":38480191,"avatar_url":"https://avatars3.githubusercontent.com/u/38480191?v=4","gravatar_id":"","url":"https://api.github.com/users/a8c-sab-trial","html_url":"https://github.com/a8c-sab-trial","followers_url":"https://api.github.com/users/a8c-sab-trial/followers","following_url":"https://api.github.com/users/a8c-sab-trial/following{/other_user}","gists_url":"https://api.github.com/users/a8c-sab-trial/gists{/gist_id}","starred_url":"https://api.github.com/users/a8c-sab-trial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a8c-sab-trial/subscriptions","organizations_url":"https://api.github.com/users/a8c-sab-trial/orgs","repos_url":"https://api.github.com/users/a8c-sab-trial/repos","events_url":"https://api.github.com/users/a8c-sab-trial/events{/privacy}","received_events_url":"https://api.github.com/users/a8c-sab-trial/received_events","type":"User","site_admin":false},"repo":{"id":130113853,"name":"WordPress-iOS","full_name":"a8c-sab-trial/WordPress-iOS","owner":{"login":"a8c-sab-trial","id":38480191,"avatar_url":"https://avatars3.githubusercontent.com/u/38480191?v=4","gravatar_id":"","url":"https://api.github.com/users/a8c-sab-trial","html_url":"https://github.com/a8c-sab-trial","followers_url":"https://api.github.com/users/a8c-sab-trial/followers","following_url":"https://api.github.com/users/a8c-sab-trial/following{/other_user}","gists_url":"https://api.github.com/users/a8c-sab-trial/gists{/gist_id}","starred_url":"https://api.github.com/users/a8c-sab-trial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a8c-sab-trial/subscriptions","organizations_url":"https://api.github.com/users/a8c-sab-trial/orgs","repos_url":"https://api.github.com/users/a8c-sab-trial/repos","events_url":"https://api.github.com/users/a8c-sab-trial/events{/privacy}","received_events_url":"https://api.github.com/users/a8c-sab-trial/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/a8c-sab-trial/WordPress-iOS","description":"WordPress for iOS - Official repository","fork":true,"url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS","forks_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/forks","keys_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/teams","hooks_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/hooks","issue_events_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/events","assignees_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/tags","blobs_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/languages","stargazers_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/stargazers","contributors_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/contributors","subscribers_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/subscribers","subscription_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/subscription","commits_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/merges","archive_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/downloads","issues_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/labels{/name}","releases_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/a8c-sab-trial/WordPress-iOS/deployments","created_at":"2018-04-18T19:45:52Z","updated_at":"2018-04-22T15:44:02Z","pushed_at":"2018-04-22T21:13:48Z","git_url":"git://github.com/a8c-sab-trial/WordPress-iOS.git","ssh_url":"git@github.com:a8c-sab-trial/WordPress-iOS.git","clone_url":"https://github.com/a8c-sab-trial/WordPress-iOS.git","svn_url":"https://github.com/a8c-sab-trial/WordPress-iOS","homepage":"http://ios.wordpress.org/","size":427930,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"wordpress-mobile:develop","ref":"develop","sha":"43473e1ba18db40457dd3759fe0c7c13330fe25c","user":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars2.githubusercontent.com/u/1306301?v=4","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":8859285,"name":"WordPress-iOS","full_name":"wordpress-mobile/WordPress-iOS","owner":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars2.githubusercontent.com/u/1306301?v=4","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wordpress-mobile/WordPress-iOS","description":"WordPress for iOS - Official repository","fork":false,"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS","forks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/forks","keys_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/teams","hooks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/hooks","issue_events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/events","assignees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/tags","blobs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/languages","stargazers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/stargazers","contributors_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/contributors","subscribers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/subscribers","subscription_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/subscription","commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/merges","archive_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/downloads","issues_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/labels{/name}","releases_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/deployments","created_at":"2013-03-18T16:59:33Z","updated_at":"2018-04-20T22:43:35Z","pushed_at":"2018-04-22T21:13:50Z","git_url":"git://github.com/wordpress-mobile/WordPress-iOS.git","ssh_url":"git@github.com:wordpress-mobile/WordPress-iOS.git","clone_url":"https://github.com/wordpress-mobile/WordPress-iOS.git","svn_url":"https://github.com/wordpress-mobile/WordPress-iOS","homepage":"http://ios.wordpress.org/","size":428382,"stargazers_count":2249,"watchers_count":2249,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":790,"mirror_url":null,"archived":false,"open_issues_count":514,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":790,"open_issues":514,"watchers":2249,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/9161"},"html":{"href":"https://github.com/wordpress-mobile/WordPress-iOS/pull/9161"},"issue":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/9161"},"comments":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/9161/comments"},"review_comments":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/9161/comments"},"review_comment":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/9161/commits"},"statuses":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/5521340536934b37c2df8d40d0c61d45fd4febfc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"a8c-sab-trial"}}