基于Amazone s3 doc http://docs.amazonwebservices.com/AmazonS3/latest/dev/UsingRESTAPImpUpload.html 尝试创建分段上传和evertythinks正常工作,直到最后一个过程“完成分段上传”。
在将完成的部分xml发布到amazon s3以组合上传的部分时,它会给出错误“我们计算的请求签名与您提供的签名不匹配。请检查您的AWS秘密访问密钥和签名方法”。
public function getAuthenticationString(verb:String, dateString:String, resource:String, contentType:String = null, hash:String = null):String {
var toSign:String = verb + "\n";
toSign += (hash != null) ? hash + "\n" : "\n";
toSign += (contentType != null) ? contentType + "\n" : "\n";
toSign += dateString + "\n" + resource;
var toSignBytes:ByteArray = new ByteArray();
toSignBytes.writeUTFBytes(toSign);
var hmacBytes:ByteArray = hmac.compute(secretAccessKeyBytes,toSignBytes);
return Base64.encodeByteArray(hmacBytes);
}
错误仅显示何时尝试将最后一部分发送到s3