{"action":"created","comment":{"url":"https://api.github.com/repos/WebEducationPlatform/CRM/pulls/comments/235497528","pull_request_review_id":177377155,"id":235497528,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTQ5NzUyOA==","diff_hunk":"@@ -97,4 +110,41 @@ public SendMailsController(MailingMessageRepository mailingMessageRepository,\n \n         return ResponseEntity.ok(\"\");\n     }\n+\n+    @Value(\"${ckeditor.img.upload.path}\")\n+    String uploadPath;\n+    @Value(\"${ckediror.img.uri}\")\n+    String uploadUri;\n+    @Value(\"${ckeditor.img.upload.target.path}\")\n+    String uploadTargetPath;\n+\n+    @PreAuthorize(\"hasAnyAuthority('OWNER', 'ADMIN')\")\n+    @PostMapping(value = \"/image/upload\", produces = \"application/json\")\n+    public ResponseEntity<ImageUploadDto> upload(@RequestPart MultipartFile upload,\n+                                                 HttpServletRequest request\n+    ) throws IOException {\n+\n+        String sourceName = upload.getOriginalFilename();\n+        String sourceExt = FilenameUtils.getExtension(sourceName).toLowerCase();\n+\n+        File destFile;\n+        File destTargetFile;\n+        String destFileName;\n+\n+        destFileName = RandomStringUtils.randomAlphabetic(8).concat(String.valueOf(System.currentTimeMillis())).concat(\".\").concat(sourceExt);","path":"src/main/java/com/ewp/crm/controllers/rest/SendMailsController.java","position":64,"original_position":64,"commit_id":"11850b07ac43e43e635c16661ab2f80107d1b8c2","original_commit_id":"11850b07ac43e43e635c16661ab2f80107d1b8c2","user":{"login":"SevostyanovGerman","id":14340478,"node_id":"MDQ6VXNlcjE0MzQwNDc4","avatar_url":"https://avatars0.githubusercontent.com/u/14340478?v=4","gravatar_id":"","url":"https://api.github.com/users/SevostyanovGerman","html_url":"https://github.com/SevostyanovGerman","followers_url":"https://api.github.com/users/SevostyanovGerman/followers","following_url":"https://api.github.com/users/SevostyanovGerman/following{/other_user}","gists_url":"https://api.github.com/users/SevostyanovGerman/gists{/gist_id}","starred_url":"https://api.github.com/users/SevostyanovGerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SevostyanovGerman/subscriptions","organizations_url":"https://api.github.com/users/SevostyanovGerman/orgs","repos_url":"https://api.github.com/users/SevostyanovGerman/repos","events_url":"https://api.github.com/users/SevostyanovGerman/events{/privacy}","received_events_url":"https://api.github.com/users/SevostyanovGerman/received_events","type":"User","site_admin":false},"body":"убрать рандом","created_at":"2018-11-21T18:28:42Z","updated_at":"2018-11-21T18:29:41Z","html_url":"https://github.com/WebEducationPlatform/CRM/pull/143#discussion_r235497528","pull_request_url":"https://api.github.com/repos/WebEducationPlatform/CRM/pulls/143","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/WebEducationPlatform/CRM/pulls/comments/235497528"},"html":{"href":"https://github.com/WebEducationPlatform/CRM/pull/143#discussion_r235497528"},"pull_request":{"href":"https://api.github.com/repos/WebEducationPlatform/CRM/pulls/143"}},"in_reply_to_id":235497321},"pull_request":{"url":"https://api.github.com/repos/WebEducationPlatform/CRM/pulls/143","id":232756476,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyNzU2NDc2","html_url":"https://github.com/WebEducationPlatform/CRM/pull/143","diff_url":"https://github.com/WebEducationPlatform/CRM/pull/143.diff","patch_url":"https://github.com/WebEducationPlatform/CRM/pull/143.patch","issue_url":"https://api.github.com/repos/WebEducationPlatform/CRM/issues/143","number":143,"state":"open","locked":false,"title":"img is sent by ckeditor","user":{"login":"EvgenKalashnikov","id":43759200,"node_id":"MDQ6VXNlcjQzNzU5MjAw","avatar_url":"https://avatars2.githubusercontent.com/u/43759200?v=4","gravatar_id":"","url":"https://api.github.com/users/EvgenKalashnikov","html_url":"https://github.com/EvgenKalashnikov","followers_url":"https://api.github.com/users/EvgenKalashnikov/followers","following_url":"https://api.github.com/users/EvgenKalashnikov/following{/other_user}","gists_url":"https://api.github.com/users/EvgenKalashnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/EvgenKalashnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvgenKalashnikov/subscriptions","organizations_url":"https://api.github.com/users/EvgenKalashnikov/orgs","repos_url":"https://api.github.com/users/EvgenKalashnikov/repos","events_url":"https://api.github.com/users/EvgenKalashnikov/events{/privacy}","received_events_url":"https://api.github.com/users/EvgenKalashnikov/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-21T18:07:35Z","updated_at":"2018-11-21T18:29:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"55ec713280111ee63befb31db6e16cc42c3a3011","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/WebEducationPlatform/CRM/pulls/143/commits","review_comments_url":"https://api.github.com/repos/WebEducationPlatform/CRM/pulls/143/comments","review_comment_url":"https://api.github.com/repos/WebEducationPlatform/CRM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WebEducationPlatform/CRM/issues/143/comments","statuses_url":"https://api.github.com/repos/WebEducationPlatform/CRM/statuses/11850b07ac43e43e635c16661ab2f80107d1b8c2","head":{"label":"WebEducationPlatform:kalashnikov005","ref":"kalashnikov005","sha":"11850b07ac43e43e635c16661ab2f80107d1b8c2","user":{"login":"WebEducationPlatform","id":22130920,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMTMwOTIw","avatar_url":"https://avatars1.githubusercontent.com/u/22130920?v=4","gravatar_id":"","url":"https://api.github.com/users/WebEducationPlatform","html_url":"https://github.com/WebEducationPlatform","followers_url":"https://api.github.com/users/WebEducationPlatform/followers","following_url":"https://api.github.com/users/WebEducationPlatform/following{/other_user}","gists_url":"https://api.github.com/users/WebEducationPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/WebEducationPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebEducationPlatform/subscriptions","organizations_url":"https://api.github.com/users/WebEducationPlatform/orgs","repos_url":"https://api.github.com/users/WebEducationPlatform/repos","events_url":"https://api.github.com/users/WebEducationPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/WebEducationPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":121249723,"node_id":"MDEwOlJlcG9zaXRvcnkxMjEyNDk3MjM=","name":"CRM","full_name":"WebEducationPlatform/CRM","private":false,"owner":{"login":"WebEducationPlatform","id":22130920,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMTMwOTIw","avatar_url":"https://avatars1.githubusercontent.com/u/22130920?v=4","gravatar_id":"","url":"https://api.github.com/users/WebEducationPlatform","html_url":"https://github.com/WebEducationPlatform","followers_url":"https://api.github.com/users/WebEducationPlatform/followers","following_url":"https://api.github.com/users/WebEducationPlatform/following{/other_user}","gists_url":"https://api.github.com/users/WebEducationPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/WebEducationPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebEducationPlatform/subscriptions","organizations_url":"https://api.github.com/users/WebEducationPlatform/orgs","repos_url":"https://api.github.com/users/WebEducationPlatform/repos","events_url":"https://api.github.com/users/WebEducationPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/WebEducationPlatform/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/WebEducationPlatform/CRM","description":null,"fork":false,"url":"https://api.github.com/repos/WebEducationPlatform/CRM","forks_url":"https://api.github.com/repos/WebEducationPlatform/CRM/forks","keys_url":"https://api.github.com/repos/WebEducationPlatform/CRM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WebEducationPlatform/CRM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WebEducationPlatform/CRM/teams","hooks_url":"https://api.github.com/repos/WebEducationPlatform/CRM/hooks","issue_events_url":"https://api.github.com/repos/WebEducationPlatform/CRM/issues/events{/number}","events_url":"https://api.github.com/repos/WebEducationPlatform/CRM/events","assignees_url":"https://api.github.com/repos/WebEducationPlatform/CRM/assignees{/user}","branches_url":"https://api.github.com/repos/WebEducationPlatform/CRM/branches{/branch}","tags_url":"https://api.github.com/repos/WebEducationPlatform/CRM/tags","blobs_url":"https://api.github.com/repos/WebEducationPlatform/CRM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WebEducationPlatform/CRM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WebEducationPlatform/CRM/git/refs{/sha}","trees_url":"https://api.github.com/repos/WebEducationPlatform/CRM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WebEducationPlatform/CRM/statuses/{sha}","languages_url":"https://api.github.com/repos/WebEducationPlatform/CRM/languages","stargazers_url":"https://api.github.com/repos/WebEducationPlatform/CRM/stargazers","contributors_url":"https://api.github.com/repos/WebEducationPlatform/CRM/contributors","subscribers_url":"https://api.github.com/repos/WebEducationPlatform/CRM/subscribers","subscription_url":"https://api.github.com/repos/WebEducationPlatform/CRM/subscription","commits_url":"https://api.github.com/repos/WebEducationPlatform/CRM/commits{/sha}","git_commits_url":"https://api.github.com/repos/WebEducationPlatform/CRM/git/commits{/sha}","comments_url":"https://api.github.com/repos/WebEducationPlatform/CRM/comments{/number}","issue_comment_url":"https://api.github.com/repos/WebEducationPlatform/CRM/issues/comments{/number}","contents_url":"https://api.github.com/repos/WebEducationPlatform/CRM/contents/{+path}","compare_url":"https://api.github.com/repos/WebEducationPlatform/CRM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WebEducationPlatform/CRM/merges","archive_url":"https://api.github.com/repos/WebEducationPlatform/CRM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WebEducationPlatform/CRM/downloads","issues_url":"https://api.github.com/repos/WebEducationPlatform/CRM/issues{/number}","pulls_url":"https://api.github.com/repos/WebEducationPlatform/CRM/pulls{/number}","milestones_url":"https://api.github.com/repos/WebEducationPlatform/CRM/milestones{/number}","notifications_url":"https://api.github.com/repos/WebEducationPlatform/CRM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WebEducationPlatform/CRM/labels{/name}","releases_url":"https://api.github.com/repos/WebEducationPlatform/CRM/releases{/id}","deployments_url":"https://api.github.com/repos/WebEducationPlatform/CRM/deployments","created_at":"2018-02-12T13:26:21Z","updated_at":"2018-11-21T12:17:18Z","pushed_at":"2018-11-21T18:07:36Z","git_url":"git://github.com/WebEducationPlatform/CRM.git","ssh_url":"git@github.com:WebEducationPlatform/CRM.git","clone_url":"https://github.com/WebEducationPlatform/CRM.git","svn_url":"https://github.com/WebEducationPlatform/CRM","homepage":null,"size":4369,"stargazers_count":5,"watchers_count":5,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":9,"open_issues":5,"watchers":5,"default_branch":"master"}},"base":{"label":"WebEducationPlatform:dev","ref":"dev","sha":"a2e90752263ec23bae7bb1f25fa092ec8289c881","user":{"login":"WebEducationPlatform","id":22130920,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMTMwOTIw","avatar_url":"https://avatars1.githubusercontent.com/u/22130920?v=4","gravatar_id":"","url":"https://api.github.com/users/WebEducationPlatform","html_url":"https://github.com/WebEducationPlatform","followers_url":"https://api.github.com/users/WebEducationPlatform/followers","following_url":"https://api.github.com/users/WebEducationPlatform/following{/other_user}","gists_url":"https://api.github.com/users/WebEducationPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/WebEducationPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebEducationPlatform/subscriptions","organizations_url":"https://api.github.com/users/WebEducationPlatform/orgs","repos_url":"https://api.github.com/users/WebEducationPlatform/repos","events_url":"https://api.github.com/users/WebEducationPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/WebEducationPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":121249723,"node_id":"MDEwOlJlcG9zaXRvcnkxMjEyNDk3MjM=","name":"CRM","full_name":"WebEducationPlatform/CRM","private":false,"owner":{"login":"WebEducationPlatform","id":22130920,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMTMwOTIw","avatar_url":"https://avatars1.githubusercontent.com/u/22130920?v=4","gravatar_id":"","url":"https://api.github.com/users/WebEducationPlatform","html_url":"https://github.com/WebEducationPlatform","followers_url":"https://api.github.com/users/WebEducationPlatform/followers","following_url":"https://api.github.com/users/WebEducationPlatform/following{/other_user}","gists_url":"https://api.github.com/users/WebEducationPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/WebEducationPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebEducationPlatform/subscriptions","organizations_url":"https://api.github.com/users/WebEducationPlatform/orgs","repos_url":"https://api.github.com/users/WebEducationPlatform/repos","events_url":"https://api.github.com/users/WebEducationPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/WebEducationPlatform/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/WebEducationPlatform/CRM","description":null,"fork":false,"url":"https://api.github.com/repos/WebEducationPlatform/CRM","forks_url":"https://api.github.com/repos/WebEducationPlatform/CRM/forks","keys_url":"https://api.github.com/repos/WebEducationPlatform/CRM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WebEducationPlatform/CRM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WebEducationPlatform/CRM/teams","hooks_url":"https://api.github.com/repos/WebEducationPlatform/CRM/hooks","issue_events_url":"https://api.github.com/repos/WebEducationPlatform/CRM/issues/events{/number}","events_url":"https://api.github.com/repos/WebEducationPlatform/CRM/events","assignees_url":"https://api.github.com/repos/WebEducationPlatform/CRM/assignees{/user}","branches_url":"https://api.github.com/repos/WebEducationPlatform/CRM/branches{/branch}","tags_url":"https://api.github.com/repos/WebEducationPlatform/CRM/tags","blobs_url":"https://api.github.com/repos/WebEducationPlatform/CRM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WebEducationPlatform/CRM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WebEducationPlatform/CRM/git/refs{/sha}","trees_url":"https://api.github.com/repos/WebEducationPlatform/CRM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WebEducationPlatform/CRM/statuses/{sha}","languages_url":"https://api.github.com/repos/WebEducationPlatform/CRM/languages","stargazers_url":"https://api.github.com/repos/WebEducationPlatform/CRM/stargazers","contributors_url":"https://api.github.com/repos/WebEducationPlatform/CRM/contributors","subscribers_url":"https://api.github.com/repos/WebEducationPlatform/CRM/subscribers","subscription_url":"https://api.github.com/repos/WebEducationPlatform/CRM/subscription","commits_url":"https://api.github.com/repos/WebEducationPlatform/CRM/commits{/sha}","git_commits_url":"https://api.github.com/repos/WebEducationPlatform/CRM/git/commits{/sha}","comments_url":"https://api.github.com/repos/WebEducationPlatform/CRM/comments{/number}","issue_comment_url":"https://api.github.com/repos/WebEducationPlatform/CRM/issues/comments{/number}","contents_url":"https://api.github.com/repos/WebEducationPlatform/CRM/contents/{+path}","compare_url":"https://api.github.com/repos/WebEducationPlatform/CRM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WebEducationPlatform/CRM/merges","archive_url":"https://api.github.com/repos/WebEducationPlatform/CRM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WebEducationPlatform/CRM/downloads","issues_url":"https://api.github.com/repos/WebEducationPlatform/CRM/issues{/number}","pulls_url":"https://api.github.com/repos/WebEducationPlatform/CRM/pulls{/number}","milestones_url":"https://api.github.com/repos/WebEducationPlatform/CRM/milestones{/number}","notifications_url":"https://api.github.com/repos/WebEducationPlatform/CRM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WebEducationPlatform/CRM/labels{/name}","releases_url":"https://api.github.com/repos/WebEducationPlatform/CRM/releases{/id}","deployments_url":"https://api.github.com/repos/WebEducationPlatform/CRM/deployments","created_at":"2018-02-12T13:26:21Z","updated_at":"2018-11-21T12:17:18Z","pushed_at":"2018-11-21T18:07:36Z","git_url":"git://github.com/WebEducationPlatform/CRM.git","ssh_url":"git@github.com:WebEducationPlatform/CRM.git","clone_url":"https://github.com/WebEducationPlatform/CRM.git","svn_url":"https://github.com/WebEducationPlatform/CRM","homepage":null,"size":4369,"stargazers_count":5,"watchers_count":5,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":9,"open_issues":5,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WebEducationPlatform/CRM/pulls/143"},"html":{"href":"https://github.com/WebEducationPlatform/CRM/pull/143"},"issue":{"href":"https://api.github.com/repos/WebEducationPlatform/CRM/issues/143"},"comments":{"href":"https://api.github.com/repos/WebEducationPlatform/CRM/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/WebEducationPlatform/CRM/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/WebEducationPlatform/CRM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WebEducationPlatform/CRM/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/WebEducationPlatform/CRM/statuses/11850b07ac43e43e635c16661ab2f80107d1b8c2"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"SevostyanovGerman"}}