我仅针对包含希伯来字符的文件出现此异常:
AWS::S3::SignatureDoesNotMatch (The request signature we calculated does not match the signature you provided. Check your key and signing method.)
建立与 S3 的连接后,代码为:
AWS::S3::S3Object.rename(
resource_file_name,
new_resource_file_name,
bucket,
{:content_type => resource_content_type} )
最佳答案
仅对第一个文件名进行编码解决了问题:
AWS::S3::S3Object.rename(
URI.encode(resource_file_name),
new_resource_file_name,
bucket,
{:content_type => resource_content_type} )
关于ruby-on-rails - 在 S3 中复制/重命名非拉丁命名文件时出现 AWS::S3::SignatureDoesNotMatch 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5528634/