{"action":"created","comment":{"url":"https://api.github.com/repos/ka8725/redmine_s3/pulls/comments/27578990","id":27578990,"diff_hunk":"@@ -1,6 +1,8 @@\n require 'redmine_s3'\n \n-Redmine::Plugin.register :redmine_s3_attachments do\n+require_dependency 'redmine_s3_hooks'\n+\n+Redmine::Plugin.register :redmine_s3 do","path":"init.rb","position":6,"original_position":6,"commit_id":"caf8af4c10f7c68a8ddf817273685d20a8aa2f23","original_commit_id":"caf8af4c10f7c68a8ddf817273685d20a8aa2f23","user":{"login":"redcloak","id":8124354,"avatar_url":"https://avatars.githubusercontent.com/u/8124354?v=3","gravatar_id":"","url":"https://api.github.com/users/redcloak","html_url":"https://github.com/redcloak","followers_url":"https://api.github.com/users/redcloak/followers","following_url":"https://api.github.com/users/redcloak/following{/other_user}","gists_url":"https://api.github.com/users/redcloak/gists{/gist_id}","starred_url":"https://api.github.com/users/redcloak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redcloak/subscriptions","organizations_url":"https://api.github.com/users/redcloak/orgs","repos_url":"https://api.github.com/users/redcloak/repos","events_url":"https://api.github.com/users/redcloak/events{/privacy}","received_events_url":"https://api.github.com/users/redcloak/received_events","type":"User","site_admin":false},"body":"Yes, there is. I added a script file and it was not copied to public/plugin_assets because plugin name was not the same as its folder. If it is named 'redmine_s3' I don't see why should it be registered under different name.","created_at":"2015-04-01T15:18:52Z","updated_at":"2015-04-01T15:18:52Z","html_url":"https://github.com/ka8725/redmine_s3/pull/32#discussion_r27578990","pull_request_url":"https://api.github.com/repos/ka8725/redmine_s3/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/ka8725/redmine_s3/pulls/comments/27578990"},"html":{"href":"https://github.com/ka8725/redmine_s3/pull/32#discussion_r27578990"},"pull_request":{"href":"https://api.github.com/repos/ka8725/redmine_s3/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/ka8725/redmine_s3/pulls/32","id":32318104,"html_url":"https://github.com/ka8725/redmine_s3/pull/32","diff_url":"https://github.com/ka8725/redmine_s3/pull/32.diff","patch_url":"https://github.com/ka8725/redmine_s3/pull/32.patch","issue_url":"https://api.github.com/repos/ka8725/redmine_s3/issues/32","number":32,"state":"open","locked":false,"title":"Added thumbnails, fixed a lot of things","user":{"login":"redcloak","id":8124354,"avatar_url":"https://avatars.githubusercontent.com/u/8124354?v=3","gravatar_id":"","url":"https://api.github.com/users/redcloak","html_url":"https://github.com/redcloak","followers_url":"https://api.github.com/users/redcloak/followers","following_url":"https://api.github.com/users/redcloak/following{/other_user}","gists_url":"https://api.github.com/users/redcloak/gists{/gist_id}","starred_url":"https://api.github.com/users/redcloak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redcloak/subscriptions","organizations_url":"https://api.github.com/users/redcloak/orgs","repos_url":"https://api.github.com/users/redcloak/repos","events_url":"https://api.github.com/users/redcloak/events{/privacy}","received_events_url":"https://api.github.com/users/redcloak/received_events","type":"User","site_admin":false},"body":"Forked your plugin, here are my changes:\r\n1. Image thumbnail generation introduced. Image thumbnail is generated if it fails to display once page is opened (there is an AJAX call to server here). Folder for thumbnails is specified in config.\r\n2. Files are now stored using relative paths with default redmine folder structure (file_folder/year/month/file.ext). It is based on “disk_directory” column of the database.\r\n3. Now files have their original filenames included into “Content-Disposition” value of S3 object so that browser downloads files with original filenames without a digital prefix (e.g. image.jpg instead of 150319143442_image.jpg).\r\n4. URLs for thumbnails and images use full URL to S3 without the 'go to redmine-server => redirect to S3' behavior. Other files are still served with redirect.\r\n5. Fixed \"View\" (clicking the “Magnifier” icon to the right from the file name) action for text files and diffs.\r\n6. files_to_s3 task now sets correct “Content-Type” and “Content-Disposition” for files. The task searches correct directory in database before uploading files to S3.\r\n7. files_to_s3 file existence check was fixed and now uses folder from S3 config.\r\n8. Max file size validation using redmine attachment_max_size config was added both for task and for new files.\r\nThis update targets Redmine 3.0.0 and should work with 2.6.x versions.","created_at":"2015-03-31T12:42:31Z","updated_at":"2015-04-01T15:18:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d7e4ebfd86e91d47973477fa082c5adb48ef67e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ka8725/redmine_s3/pulls/32/commits","review_comments_url":"https://api.github.com/repos/ka8725/redmine_s3/pulls/32/comments","review_comment_url":"https://api.github.com/repos/ka8725/redmine_s3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ka8725/redmine_s3/issues/32/comments","statuses_url":"https://api.github.com/repos/ka8725/redmine_s3/statuses/caf8af4c10f7c68a8ddf817273685d20a8aa2f23","head":{"label":"redcloak:no_readme","ref":"no_readme","sha":"caf8af4c10f7c68a8ddf817273685d20a8aa2f23","user":{"login":"redcloak","id":8124354,"avatar_url":"https://avatars.githubusercontent.com/u/8124354?v=3","gravatar_id":"","url":"https://api.github.com/users/redcloak","html_url":"https://github.com/redcloak","followers_url":"https://api.github.com/users/redcloak/followers","following_url":"https://api.github.com/users/redcloak/following{/other_user}","gists_url":"https://api.github.com/users/redcloak/gists{/gist_id}","starred_url":"https://api.github.com/users/redcloak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redcloak/subscriptions","organizations_url":"https://api.github.com/users/redcloak/orgs","repos_url":"https://api.github.com/users/redcloak/repos","events_url":"https://api.github.com/users/redcloak/events{/privacy}","received_events_url":"https://api.github.com/users/redcloak/received_events","type":"User","site_admin":false},"repo":{"id":31597847,"name":"redmine_s3","full_name":"redcloak/redmine_s3","owner":{"login":"redcloak","id":8124354,"avatar_url":"https://avatars.githubusercontent.com/u/8124354?v=3","gravatar_id":"","url":"https://api.github.com/users/redcloak","html_url":"https://github.com/redcloak","followers_url":"https://api.github.com/users/redcloak/followers","following_url":"https://api.github.com/users/redcloak/following{/other_user}","gists_url":"https://api.github.com/users/redcloak/gists{/gist_id}","starred_url":"https://api.github.com/users/redcloak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redcloak/subscriptions","organizations_url":"https://api.github.com/users/redcloak/orgs","repos_url":"https://api.github.com/users/redcloak/repos","events_url":"https://api.github.com/users/redcloak/events{/privacy}","received_events_url":"https://api.github.com/users/redcloak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/redcloak/redmine_s3","description":"Uses Amazon S3 for storing attachments","fork":true,"url":"https://api.github.com/repos/redcloak/redmine_s3","forks_url":"https://api.github.com/repos/redcloak/redmine_s3/forks","keys_url":"https://api.github.com/repos/redcloak/redmine_s3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/redcloak/redmine_s3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/redcloak/redmine_s3/teams","hooks_url":"https://api.github.com/repos/redcloak/redmine_s3/hooks","issue_events_url":"https://api.github.com/repos/redcloak/redmine_s3/issues/events{/number}","events_url":"https://api.github.com/repos/redcloak/redmine_s3/events","assignees_url":"https://api.github.com/repos/redcloak/redmine_s3/assignees{/user}","branches_url":"https://api.github.com/repos/redcloak/redmine_s3/branches{/branch}","tags_url":"https://api.github.com/repos/redcloak/redmine_s3/tags","blobs_url":"https://api.github.com/repos/redcloak/redmine_s3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/redcloak/redmine_s3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/redcloak/redmine_s3/git/refs{/sha}","trees_url":"https://api.github.com/repos/redcloak/redmine_s3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/redcloak/redmine_s3/statuses/{sha}","languages_url":"https://api.github.com/repos/redcloak/redmine_s3/languages","stargazers_url":"https://api.github.com/repos/redcloak/redmine_s3/stargazers","contributors_url":"https://api.github.com/repos/redcloak/redmine_s3/contributors","subscribers_url":"https://api.github.com/repos/redcloak/redmine_s3/subscribers","subscription_url":"https://api.github.com/repos/redcloak/redmine_s3/subscription","commits_url":"https://api.github.com/repos/redcloak/redmine_s3/commits{/sha}","git_commits_url":"https://api.github.com/repos/redcloak/redmine_s3/git/commits{/sha}","comments_url":"https://api.github.com/repos/redcloak/redmine_s3/comments{/number}","issue_comment_url":"https://api.github.com/repos/redcloak/redmine_s3/issues/comments{/number}","contents_url":"https://api.github.com/repos/redcloak/redmine_s3/contents/{+path}","compare_url":"https://api.github.com/repos/redcloak/redmine_s3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/redcloak/redmine_s3/merges","archive_url":"https://api.github.com/repos/redcloak/redmine_s3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/redcloak/redmine_s3/downloads","issues_url":"https://api.github.com/repos/redcloak/redmine_s3/issues{/number}","pulls_url":"https://api.github.com/repos/redcloak/redmine_s3/pulls{/number}","milestones_url":"https://api.github.com/repos/redcloak/redmine_s3/milestones{/number}","notifications_url":"https://api.github.com/repos/redcloak/redmine_s3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/redcloak/redmine_s3/labels{/name}","releases_url":"https://api.github.com/repos/redcloak/redmine_s3/releases{/id}","created_at":"2015-03-03T12:43:35Z","updated_at":"2015-03-31T12:23:00Z","pushed_at":"2015-03-31T12:28:05Z","git_url":"git://github.com/redcloak/redmine_s3.git","ssh_url":"git@github.com:redcloak/redmine_s3.git","clone_url":"https://github.com/redcloak/redmine_s3.git","svn_url":"https://github.com/redcloak/redmine_s3","homepage":"","size":416,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ka8725:master","ref":"master","sha":"af4ef4faa2247e31a5b859ef99b2674f3f7e4846","user":{"login":"ka8725","id":243846,"avatar_url":"https://avatars.githubusercontent.com/u/243846?v=3","gravatar_id":"","url":"https://api.github.com/users/ka8725","html_url":"https://github.com/ka8725","followers_url":"https://api.github.com/users/ka8725/followers","following_url":"https://api.github.com/users/ka8725/following{/other_user}","gists_url":"https://api.github.com/users/ka8725/gists{/gist_id}","starred_url":"https://api.github.com/users/ka8725/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ka8725/subscriptions","organizations_url":"https://api.github.com/users/ka8725/orgs","repos_url":"https://api.github.com/users/ka8725/repos","events_url":"https://api.github.com/users/ka8725/events{/privacy}","received_events_url":"https://api.github.com/users/ka8725/received_events","type":"User","site_admin":false},"repo":{"id":4340878,"name":"redmine_s3","full_name":"ka8725/redmine_s3","owner":{"login":"ka8725","id":243846,"avatar_url":"https://avatars.githubusercontent.com/u/243846?v=3","gravatar_id":"","url":"https://api.github.com/users/ka8725","html_url":"https://github.com/ka8725","followers_url":"https://api.github.com/users/ka8725/followers","following_url":"https://api.github.com/users/ka8725/following{/other_user}","gists_url":"https://api.github.com/users/ka8725/gists{/gist_id}","starred_url":"https://api.github.com/users/ka8725/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ka8725/subscriptions","organizations_url":"https://api.github.com/users/ka8725/orgs","repos_url":"https://api.github.com/users/ka8725/repos","events_url":"https://api.github.com/users/ka8725/events{/privacy}","received_events_url":"https://api.github.com/users/ka8725/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ka8725/redmine_s3","description":"Uses Amazon S3 for storing attachments","fork":true,"url":"https://api.github.com/repos/ka8725/redmine_s3","forks_url":"https://api.github.com/repos/ka8725/redmine_s3/forks","keys_url":"https://api.github.com/repos/ka8725/redmine_s3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ka8725/redmine_s3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ka8725/redmine_s3/teams","hooks_url":"https://api.github.com/repos/ka8725/redmine_s3/hooks","issue_events_url":"https://api.github.com/repos/ka8725/redmine_s3/issues/events{/number}","events_url":"https://api.github.com/repos/ka8725/redmine_s3/events","assignees_url":"https://api.github.com/repos/ka8725/redmine_s3/assignees{/user}","branches_url":"https://api.github.com/repos/ka8725/redmine_s3/branches{/branch}","tags_url":"https://api.github.com/repos/ka8725/redmine_s3/tags","blobs_url":"https://api.github.com/repos/ka8725/redmine_s3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ka8725/redmine_s3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ka8725/redmine_s3/git/refs{/sha}","trees_url":"https://api.github.com/repos/ka8725/redmine_s3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ka8725/redmine_s3/statuses/{sha}","languages_url":"https://api.github.com/repos/ka8725/redmine_s3/languages","stargazers_url":"https://api.github.com/repos/ka8725/redmine_s3/stargazers","contributors_url":"https://api.github.com/repos/ka8725/redmine_s3/contributors","subscribers_url":"https://api.github.com/repos/ka8725/redmine_s3/subscribers","subscription_url":"https://api.github.com/repos/ka8725/redmine_s3/subscription","commits_url":"https://api.github.com/repos/ka8725/redmine_s3/commits{/sha}","git_commits_url":"https://api.github.com/repos/ka8725/redmine_s3/git/commits{/sha}","comments_url":"https://api.github.com/repos/ka8725/redmine_s3/comments{/number}","issue_comment_url":"https://api.github.com/repos/ka8725/redmine_s3/issues/comments{/number}","contents_url":"https://api.github.com/repos/ka8725/redmine_s3/contents/{+path}","compare_url":"https://api.github.com/repos/ka8725/redmine_s3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ka8725/redmine_s3/merges","archive_url":"https://api.github.com/repos/ka8725/redmine_s3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ka8725/redmine_s3/downloads","issues_url":"https://api.github.com/repos/ka8725/redmine_s3/issues{/number}","pulls_url":"https://api.github.com/repos/ka8725/redmine_s3/pulls{/number}","milestones_url":"https://api.github.com/repos/ka8725/redmine_s3/milestones{/number}","notifications_url":"https://api.github.com/repos/ka8725/redmine_s3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ka8725/redmine_s3/labels{/name}","releases_url":"https://api.github.com/repos/ka8725/redmine_s3/releases{/id}","created_at":"2012-05-15T21:31:27Z","updated_at":"2015-04-01T01:11:18Z","pushed_at":"2015-03-31T12:42:33Z","git_url":"git://github.com/ka8725/redmine_s3.git","ssh_url":"git@github.com:ka8725/redmine_s3.git","clone_url":"https://github.com/ka8725/redmine_s3.git","svn_url":"https://github.com/ka8725/redmine_s3","homepage":"","size":537,"stargazers_count":48,"watchers_count":48,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":3,"forks":31,"open_issues":3,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ka8725/redmine_s3/pulls/32"},"html":{"href":"https://github.com/ka8725/redmine_s3/pull/32"},"issue":{"href":"https://api.github.com/repos/ka8725/redmine_s3/issues/32"},"comments":{"href":"https://api.github.com/repos/ka8725/redmine_s3/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/ka8725/redmine_s3/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/ka8725/redmine_s3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ka8725/redmine_s3/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/ka8725/redmine_s3/statuses/caf8af4c10f7c68a8ddf817273685d20a8aa2f23"}}}}