我正在尝试将 Amazon 的 AWS SDK 用于 .NET、S3 存储。我使用这段代码:
using (var client = new AmazonS3Client(AwsAccessKey, AwsSecretAccessKey, new AmazonS3Config { ServiceURL = ServiceUrl }))
{
var request = new PutObjectRequest
{
BucketName = BucketName,
Key = path,
ContentBody = contents,
ContentType = "text/plain"
};
client.PutObject(request);
}
我不断收到此错误(该值本身对应于 DateTime.UtcNow。
Value (Tue, 31 Dec 2013 14:13:04 GMT) for parameter Timestamp is invalid. Must be in ISO8601 format.
我找不到任何设置时间戳的地方。有什么建议么?