{"action":"created","comment":{"url":"https://api.github.com/repos/exoplatform/mobile-ios/pulls/comments/46105138","id":46105138,"diff_hunk":"@@ -1156,4 +1157,19 @@ - (UIImage *) rotateImage:(UIImage *)image {\n     return newImage;\n }\n \n+-(NSString *) MIMETypeForFile:(NSString *)fileName {\n+    NSRange lastPointRange = [fileName rangeOfString:@\".\" options:NSBackwardsSearch];\n+    if (lastPointRange.location != NSNotFound) {\n+        NSString * fileExtension = [fileName substringFromIndex:lastPointRange.location+1];\n+        CFStringRef pathExtension = (__bridge CFStringRef)(fileExtension);\n+        CFStringRef type = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension, NULL);\n+        CFRelease(pathExtension);\n+        // The UTI can be converted to a mime type:\n+        NSString *mimeType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass(type, kUTTagClassMIMEType);\n+        return mimeType;\n+    }\n+    \n+    return @\"text/html\";","path":"share-extension/ShareViewController.m","position":26,"original_position":26,"commit_id":"e562287c031c6fae4872a9639fe549c43adea0df","original_commit_id":"e562287c031c6fae4872a9639fe549c43adea0df","user":{"login":"paristote","id":648542,"avatar_url":"https://avatars.githubusercontent.com/u/648542?v=3","gravatar_id":"","url":"https://api.github.com/users/paristote","html_url":"https://github.com/paristote","followers_url":"https://api.github.com/users/paristote/followers","following_url":"https://api.github.com/users/paristote/following{/other_user}","gists_url":"https://api.github.com/users/paristote/gists{/gist_id}","starred_url":"https://api.github.com/users/paristote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paristote/subscriptions","organizations_url":"https://api.github.com/users/paristote/orgs","repos_url":"https://api.github.com/users/paristote/repos","events_url":"https://api.github.com/users/paristote/events{/privacy}","received_events_url":"https://api.github.com/users/paristote/received_events","type":"User","site_admin":false},"body":"Is there any reason why you're forcing the mime type to `text/html` if the real type can't be found ?\r\nIf not, then you should return `nil` and not add the `mimeType` property in the template params.","created_at":"2015-11-30T02:53:10Z","updated_at":"2015-11-30T02:53:10Z","html_url":"https://github.com/exoplatform/mobile-ios/pull/72#discussion_r46105138","pull_request_url":"https://api.github.com/repos/exoplatform/mobile-ios/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/exoplatform/mobile-ios/pulls/comments/46105138"},"html":{"href":"https://github.com/exoplatform/mobile-ios/pull/72#discussion_r46105138"},"pull_request":{"href":"https://api.github.com/repos/exoplatform/mobile-ios/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/exoplatform/mobile-ios/pulls/72","id":51966927,"html_url":"https://github.com/exoplatform/mobile-ios/pull/72","diff_url":"https://github.com/exoplatform/mobile-ios/pull/72.diff","patch_url":"https://github.com/exoplatform/mobile-ios/pull/72.patch","issue_url":"https://api.github.com/repos/exoplatform/mobile-ios/issues/72","number":72,"state":"open","locked":false,"title":"MOB-1988 Set MIMEType for item that upload by Share Extension","user":{"login":"diego10bk","id":1519488,"avatar_url":"https://avatars.githubusercontent.com/u/1519488?v=3","gravatar_id":"","url":"https://api.github.com/users/diego10bk","html_url":"https://github.com/diego10bk","followers_url":"https://api.github.com/users/diego10bk/followers","following_url":"https://api.github.com/users/diego10bk/following{/other_user}","gists_url":"https://api.github.com/users/diego10bk/gists{/gist_id}","starred_url":"https://api.github.com/users/diego10bk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diego10bk/subscriptions","organizations_url":"https://api.github.com/users/diego10bk/orgs","repos_url":"https://api.github.com/users/diego10bk/repos","events_url":"https://api.github.com/users/diego10bk/events{/privacy}","received_events_url":"https://api.github.com/users/diego10bk/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-27T07:34:54Z","updated_at":"2015-11-30T02:53:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ff75295e7612f5d03dd3a92bc4ac1a9d2dbcf73","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/exoplatform/mobile-ios/pulls/72/commits","review_comments_url":"https://api.github.com/repos/exoplatform/mobile-ios/pulls/72/comments","review_comment_url":"https://api.github.com/repos/exoplatform/mobile-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/exoplatform/mobile-ios/issues/72/comments","statuses_url":"https://api.github.com/repos/exoplatform/mobile-ios/statuses/e562287c031c6fae4872a9639fe549c43adea0df","head":{"label":"exoplatform:fix/MOB-1988-mimetype","ref":"fix/MOB-1988-mimetype","sha":"e562287c031c6fae4872a9639fe549c43adea0df","user":{"login":"exoplatform","id":259384,"avatar_url":"https://avatars.githubusercontent.com/u/259384?v=3","gravatar_id":"","url":"https://api.github.com/users/exoplatform","html_url":"https://github.com/exoplatform","followers_url":"https://api.github.com/users/exoplatform/followers","following_url":"https://api.github.com/users/exoplatform/following{/other_user}","gists_url":"https://api.github.com/users/exoplatform/gists{/gist_id}","starred_url":"https://api.github.com/users/exoplatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exoplatform/subscriptions","organizations_url":"https://api.github.com/users/exoplatform/orgs","repos_url":"https://api.github.com/users/exoplatform/repos","events_url":"https://api.github.com/users/exoplatform/events{/privacy}","received_events_url":"https://api.github.com/users/exoplatform/received_events","type":"Organization","site_admin":false},"repo":{"id":3938684,"name":"mobile-ios","full_name":"exoplatform/mobile-ios","owner":{"login":"exoplatform","id":259384,"avatar_url":"https://avatars.githubusercontent.com/u/259384?v=3","gravatar_id":"","url":"https://api.github.com/users/exoplatform","html_url":"https://github.com/exoplatform","followers_url":"https://api.github.com/users/exoplatform/followers","following_url":"https://api.github.com/users/exoplatform/following{/other_user}","gists_url":"https://api.github.com/users/exoplatform/gists{/gist_id}","starred_url":"https://api.github.com/users/exoplatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exoplatform/subscriptions","organizations_url":"https://api.github.com/users/exoplatform/orgs","repos_url":"https://api.github.com/users/exoplatform/repos","events_url":"https://api.github.com/users/exoplatform/events{/privacy}","received_events_url":"https://api.github.com/users/exoplatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/exoplatform/mobile-ios","description":"eXo Mobile for iOS","fork":false,"url":"https://api.github.com/repos/exoplatform/mobile-ios","forks_url":"https://api.github.com/repos/exoplatform/mobile-ios/forks","keys_url":"https://api.github.com/repos/exoplatform/mobile-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exoplatform/mobile-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exoplatform/mobile-ios/teams","hooks_url":"https://api.github.com/repos/exoplatform/mobile-ios/hooks","issue_events_url":"https://api.github.com/repos/exoplatform/mobile-ios/issues/events{/number}","events_url":"https://api.github.com/repos/exoplatform/mobile-ios/events","assignees_url":"https://api.github.com/repos/exoplatform/mobile-ios/assignees{/user}","branches_url":"https://api.github.com/repos/exoplatform/mobile-ios/branches{/branch}","tags_url":"https://api.github.com/repos/exoplatform/mobile-ios/tags","blobs_url":"https://api.github.com/repos/exoplatform/mobile-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exoplatform/mobile-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exoplatform/mobile-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/exoplatform/mobile-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exoplatform/mobile-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/exoplatform/mobile-ios/languages","stargazers_url":"https://api.github.com/repos/exoplatform/mobile-ios/stargazers","contributors_url":"https://api.github.com/repos/exoplatform/mobile-ios/contributors","subscribers_url":"https://api.github.com/repos/exoplatform/mobile-ios/subscribers","subscription_url":"https://api.github.com/repos/exoplatform/mobile-ios/subscription","commits_url":"https://api.github.com/repos/exoplatform/mobile-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/exoplatform/mobile-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/exoplatform/mobile-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/exoplatform/mobile-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/exoplatform/mobile-ios/contents/{+path}","compare_url":"https://api.github.com/repos/exoplatform/mobile-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exoplatform/mobile-ios/merges","archive_url":"https://api.github.com/repos/exoplatform/mobile-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exoplatform/mobile-ios/downloads","issues_url":"https://api.github.com/repos/exoplatform/mobile-ios/issues{/number}","pulls_url":"https://api.github.com/repos/exoplatform/mobile-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/exoplatform/mobile-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/exoplatform/mobile-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exoplatform/mobile-ios/labels{/name}","releases_url":"https://api.github.com/repos/exoplatform/mobile-ios/releases{/id}","created_at":"2012-04-05T10:48:19Z","updated_at":"2015-10-07T02:45:52Z","pushed_at":"2015-11-27T07:50:19Z","git_url":"git://github.com/exoplatform/mobile-ios.git","ssh_url":"git@github.com:exoplatform/mobile-ios.git","clone_url":"https://github.com/exoplatform/mobile-ios.git","svn_url":"https://github.com/exoplatform/mobile-ios","homepage":null,"size":95127,"stargazers_count":6,"watchers_count":6,"language":"Objective-C","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":3,"forks":17,"open_issues":3,"watchers":6,"default_branch":"master"}},"base":{"label":"exoplatform:develop","ref":"develop","sha":"00a0f3177b7594a7b09d1a50084d9eda2995e36f","user":{"login":"exoplatform","id":259384,"avatar_url":"https://avatars.githubusercontent.com/u/259384?v=3","gravatar_id":"","url":"https://api.github.com/users/exoplatform","html_url":"https://github.com/exoplatform","followers_url":"https://api.github.com/users/exoplatform/followers","following_url":"https://api.github.com/users/exoplatform/following{/other_user}","gists_url":"https://api.github.com/users/exoplatform/gists{/gist_id}","starred_url":"https://api.github.com/users/exoplatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exoplatform/subscriptions","organizations_url":"https://api.github.com/users/exoplatform/orgs","repos_url":"https://api.github.com/users/exoplatform/repos","events_url":"https://api.github.com/users/exoplatform/events{/privacy}","received_events_url":"https://api.github.com/users/exoplatform/received_events","type":"Organization","site_admin":false},"repo":{"id":3938684,"name":"mobile-ios","full_name":"exoplatform/mobile-ios","owner":{"login":"exoplatform","id":259384,"avatar_url":"https://avatars.githubusercontent.com/u/259384?v=3","gravatar_id":"","url":"https://api.github.com/users/exoplatform","html_url":"https://github.com/exoplatform","followers_url":"https://api.github.com/users/exoplatform/followers","following_url":"https://api.github.com/users/exoplatform/following{/other_user}","gists_url":"https://api.github.com/users/exoplatform/gists{/gist_id}","starred_url":"https://api.github.com/users/exoplatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exoplatform/subscriptions","organizations_url":"https://api.github.com/users/exoplatform/orgs","repos_url":"https://api.github.com/users/exoplatform/repos","events_url":"https://api.github.com/users/exoplatform/events{/privacy}","received_events_url":"https://api.github.com/users/exoplatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/exoplatform/mobile-ios","description":"eXo Mobile for iOS","fork":false,"url":"https://api.github.com/repos/exoplatform/mobile-ios","forks_url":"https://api.github.com/repos/exoplatform/mobile-ios/forks","keys_url":"https://api.github.com/repos/exoplatform/mobile-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exoplatform/mobile-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exoplatform/mobile-ios/teams","hooks_url":"https://api.github.com/repos/exoplatform/mobile-ios/hooks","issue_events_url":"https://api.github.com/repos/exoplatform/mobile-ios/issues/events{/number}","events_url":"https://api.github.com/repos/exoplatform/mobile-ios/events","assignees_url":"https://api.github.com/repos/exoplatform/mobile-ios/assignees{/user}","branches_url":"https://api.github.com/repos/exoplatform/mobile-ios/branches{/branch}","tags_url":"https://api.github.com/repos/exoplatform/mobile-ios/tags","blobs_url":"https://api.github.com/repos/exoplatform/mobile-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exoplatform/mobile-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exoplatform/mobile-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/exoplatform/mobile-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exoplatform/mobile-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/exoplatform/mobile-ios/languages","stargazers_url":"https://api.github.com/repos/exoplatform/mobile-ios/stargazers","contributors_url":"https://api.github.com/repos/exoplatform/mobile-ios/contributors","subscribers_url":"https://api.github.com/repos/exoplatform/mobile-ios/subscribers","subscription_url":"https://api.github.com/repos/exoplatform/mobile-ios/subscription","commits_url":"https://api.github.com/repos/exoplatform/mobile-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/exoplatform/mobile-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/exoplatform/mobile-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/exoplatform/mobile-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/exoplatform/mobile-ios/contents/{+path}","compare_url":"https://api.github.com/repos/exoplatform/mobile-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exoplatform/mobile-ios/merges","archive_url":"https://api.github.com/repos/exoplatform/mobile-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exoplatform/mobile-ios/downloads","issues_url":"https://api.github.com/repos/exoplatform/mobile-ios/issues{/number}","pulls_url":"https://api.github.com/repos/exoplatform/mobile-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/exoplatform/mobile-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/exoplatform/mobile-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exoplatform/mobile-ios/labels{/name}","releases_url":"https://api.github.com/repos/exoplatform/mobile-ios/releases{/id}","created_at":"2012-04-05T10:48:19Z","updated_at":"2015-10-07T02:45:52Z","pushed_at":"2015-11-27T07:50:19Z","git_url":"git://github.com/exoplatform/mobile-ios.git","ssh_url":"git@github.com:exoplatform/mobile-ios.git","clone_url":"https://github.com/exoplatform/mobile-ios.git","svn_url":"https://github.com/exoplatform/mobile-ios","homepage":null,"size":95127,"stargazers_count":6,"watchers_count":6,"language":"Objective-C","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":3,"forks":17,"open_issues":3,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/exoplatform/mobile-ios/pulls/72"},"html":{"href":"https://github.com/exoplatform/mobile-ios/pull/72"},"issue":{"href":"https://api.github.com/repos/exoplatform/mobile-ios/issues/72"},"comments":{"href":"https://api.github.com/repos/exoplatform/mobile-ios/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/exoplatform/mobile-ios/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/exoplatform/mobile-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/exoplatform/mobile-ios/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/exoplatform/mobile-ios/statuses/e562287c031c6fae4872a9639fe549c43adea0df"}}}}