{"action":"created","issue":{"url":"https://api.github.com/repos/janko-m/shrine/issues/93","repository_url":"https://api.github.com/repos/janko-m/shrine","labels_url":"https://api.github.com/repos/janko-m/shrine/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/janko-m/shrine/issues/93/comments","events_url":"https://api.github.com/repos/janko-m/shrine/issues/93/events","html_url":"https://github.com/janko-m/shrine/issues/93","id":181687116,"number":93,"title":"File upload broken when filename contains accent","user":{"login":"jonasheinrich","id":5173966,"avatar_url":"https://avatars.githubusercontent.com/u/5173966?v=3","gravatar_id":"","url":"https://api.github.com/users/jonasheinrich","html_url":"https://github.com/jonasheinrich","followers_url":"https://api.github.com/users/jonasheinrich/followers","following_url":"https://api.github.com/users/jonasheinrich/following{/other_user}","gists_url":"https://api.github.com/users/jonasheinrich/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasheinrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasheinrich/subscriptions","organizations_url":"https://api.github.com/users/jonasheinrich/orgs","repos_url":"https://api.github.com/users/jonasheinrich/repos","events_url":"https://api.github.com/users/jonasheinrich/events{/privacy}","received_events_url":"https://api.github.com/users/jonasheinrich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-07T14:43:41Z","updated_at":"2016-10-07T16:25:38Z","closed_at":null,"body":"Hi Janko, \r\n\r\nI think the following happens: \r\n\r\n - I choose a file with an accent in its filename (e.g. `été.pdf`)\r\n - shrine determines the filename from the path\r\n - shrine tries to upload the file and set the content disposition header including the filename\r\n - that breaks (probably the `POST` is invalid)\r\n\r\nThe error I get: `Aws::S3::Errors::SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.`\r\n\r\nSolution would be to url encode the filename. I think storing the filename decoded is fine so probably it is the best to encode everytime there's gonna be a request. \r\n\r\nWhat do you think?\r\n\r\nJonas"},"comment":{"url":"https://api.github.com/repos/janko-m/shrine/issues/comments/252297594","html_url":"https://github.com/janko-m/shrine/issues/93#issuecomment-252297594","issue_url":"https://api.github.com/repos/janko-m/shrine/issues/93","id":252297594,"user":{"login":"janko-m","id":795488,"avatar_url":"https://avatars.githubusercontent.com/u/795488?v=3","gravatar_id":"","url":"https://api.github.com/users/janko-m","html_url":"https://github.com/janko-m","followers_url":"https://api.github.com/users/janko-m/followers","following_url":"https://api.github.com/users/janko-m/following{/other_user}","gists_url":"https://api.github.com/users/janko-m/gists{/gist_id}","starred_url":"https://api.github.com/users/janko-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janko-m/subscriptions","organizations_url":"https://api.github.com/users/janko-m/orgs","repos_url":"https://api.github.com/users/janko-m/repos","events_url":"https://api.github.com/users/janko-m/events{/privacy}","received_events_url":"https://api.github.com/users/janko-m/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T16:25:38Z","updated_at":"2016-10-07T16:25:38Z","body":"Thanks for reporting. I've found the matching aws-sdk issue – https://github.com/aws/aws-sdk-ruby/issues/1230). I agree, I think a good solution would be to URI-encode the filename both on upload and when generating a presigned URL. I will push a fix shortly."}}
{"actor":{"display_login":"janko-m"}}