{"action":"created","issue":{"url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/892","labels_url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/892/labels{/name}","comments_url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/892/comments","events_url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/892/events","html_url":"https://github.com/froala/wysiwyg-editor/issues/892","id":114684245,"number":892,"title":"Paste image gives the error \"Something went wrong. Please try again.\" when configured to use S3","user":{"login":"chrisdavies","id":833377,"avatar_url":"https://avatars.githubusercontent.com/u/833377?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisdavies","html_url":"https://github.com/chrisdavies","followers_url":"https://api.github.com/users/chrisdavies/followers","following_url":"https://api.github.com/users/chrisdavies/following{/other_user}","gists_url":"https://api.github.com/users/chrisdavies/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdavies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdavies/subscriptions","organizations_url":"https://api.github.com/users/chrisdavies/orgs","repos_url":"https://api.github.com/users/chrisdavies/repos","events_url":"https://api.github.com/users/chrisdavies/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdavies/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-02T21:08:49Z","updated_at":"2015-11-03T12:20:14Z","closed_at":null,"body":"It is not unlikely that this is an issue with my S3 configuration, but having some kind of diagnostic (via `console.log` or something) would be helpful, as I have no idea what is wrong (if anything) with my S3 configuration.\r\n\r\nMy Ruby code looks like this, in a helper class, and I have confirmed that the values coming out of `ConfigS3.config` are correct:\r\n\r\n```ruby\r\ndef froala_s3_image_config\r\n    s3_config = {\r\n      region: 's3',\r\n      bucket: ConfigS3.config['bucket'],\r\n      keyStart: 'rte_attachments/',\r\n      acl: 'public-read',\r\n      accessKeyId: ConfigS3.config['aws_access_key_id']\r\n    }\r\n\r\n    policy = {\r\n      expiration: 1.day.from_now.iso8601,\r\n      conditions: [\r\n        { bucket: s3_config[:bucket] },\r\n        { acl: s3_config[:acl] },\r\n        { success_action_status: '201' },\r\n        { 'x-requested-with': 'xhr' },\r\n        [ 'starts-with', '$key', s3_config[:keyStart] ],\r\n        [ 'starts-with', '$Content-Type', '' ]\r\n      ]\r\n    }\r\n\r\n    s3_config[:policy] = Base64.encode64(policy.to_json)\r\n    s3_config[:signature] = Base64.encode64(\r\n      OpenSSL::HMAC.digest(\r\n        OpenSSL::Digest.new('sha1'),\r\n        ConfigS3.config['aws_secret_access_key'],\r\n        s3_config[:policy]\r\n      )\r\n    ).gsub(\"\\n\",\"\")\r\n\r\n    return s3_config.to_json\r\n  end\r\n```\r\n\r\nAnd in my JavaScript, I have this, which I will eventually change for caching reasons, but I'm just trying to get it to work!\r\n\r\n```js\r\nimageUploadToS3: <%= froala_s3_image_config.html_safe %>,\r\n```\r\n\r\nThanks in advance!\r\n"},"comment":{"url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/comments/153336465","html_url":"https://github.com/froala/wysiwyg-editor/issues/892#issuecomment-153336465","issue_url":"https://api.github.com/repos/froala/wysiwyg-editor/issues/892","id":153336465,"user":{"login":"stefanneculai","id":637004,"avatar_url":"https://avatars.githubusercontent.com/u/637004?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanneculai","html_url":"https://github.com/stefanneculai","followers_url":"https://api.github.com/users/stefanneculai/followers","following_url":"https://api.github.com/users/stefanneculai/following{/other_user}","gists_url":"https://api.github.com/users/stefanneculai/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanneculai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanneculai/subscriptions","organizations_url":"https://api.github.com/users/stefanneculai/orgs","repos_url":"https://api.github.com/users/stefanneculai/repos","events_url":"https://api.github.com/users/stefanneculai/events{/privacy}","received_events_url":"https://api.github.com/users/stefanneculai/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T12:20:14Z","updated_at":"2015-11-03T12:20:14Z","body":"Are you using the V2 from the master of this repo? I have just tested it and it works fine for me."}}