我正在将文件上传器设置到AWS S3存储桶,而没有后端代码。 因此,我正在为每个上传的文件生成一个规范请求,如下所示。
PUT
/e588bd4c-9672-4caf-b7c9-788bb1159d34_hhhhh_index.html
content-encoding:base64
host:[bucketname].s3.[region].amazonaws.com
x-amz-content-sha256:UNSIGNED-PAYLOAD
x-amz-date:20190729T131510Z
x-amz-security-token:AgoJb3JpZ2luX2VjEP3//////////wEaDGV1LWNlbnRyYWwtMSJHMEUCIQCx13a3BI5phitmGi4yROSR5u545FU29qDZUSmuLQaSkgIgUwyeX9/FiQeTkK6RjZW5xZ8B3XMvs2ys0TZbp2cQX7Eq6QYIdhAAGgw0NjM5ODYxNDMyOTMiDPzG2x/qoXfm1xnn6irGBspGmj2Pq50Kib8bzlN8ybF8WFFPUZtrRyme1EmHFwRroWCUAzZ/8VphKkYnfv9m1tLmQAlhkeGXH1hsNP6GhmrEZY+jXvVOkEZmhr6CKD813rk/k62DgdMRfZloRxa31zRwOMIrnYgwbZo/HD6knIHHOS5WIq9dlXUZP8QVt9yPDr1ne4NEE8OZmDKv87rbEEQv373+723wWu6VnjAPi3idg85Sxb9HuPt+T5GoFLcJKiEFJApypiHqZZ8slecYAT9++LH8qmxQ1jZ2L5pvUDEflU1nwWCgoy3QA7OEGO7DKc3wZ2vzOk4gLX/RX28J+QKlgomvpWaTK0bNn2LZ9u2DjhKMcWVjUM+uUXcMqtcPIvrALXP7EYhccERsVxJBc101PzdUCWEReUzNhx1tiv+DQxP9KuLchhYegDAM3Fr+umy2Bq0Y+3pv4bhdRolym2azZ+elxqYm3tjSSHZmbMMJMu+4uuqXx4MHl/bHdUhBMfsipM0DkuMhvtqIDyuJwitY0HirBNVLFG0ZCMG6tcAquIkhkkdLdob/w9/SDyObqiL7S8XR1mGkdTmHB2fi2WABnYCY3CfUNgCQbGTJvZ7LCSJndQ6qNjBZWGBBNVOzTAGXtW1HfGOWQTCAXb1VNfQSiSicC+RMAgQdX9+ofMdNdK1yiHiyUL8qmLZBPZfzwsi0DCegd7hAsoATCX4q5XHIhIYaFvnmDBHuHtApGZfKt0bM8TTqyYJfUctzmIMwmPO/tLUaUIS9Ec2tL1kh3DZ7/HqKelJGYTHnZRp4We/UhHRz3xpBQAwmrCL5TXUpsj1IM7lV476w2wOFmRhP5Bve2QIv6QSgZ/dHM453/y/ZiVOrm9NLi7qHbnLFaVCV3rF2X0jGl8/SP06ZqjMOmAEzEaGIWS3pBmgkqA92dt0kGrQ68eHd4NSiS6o8fEKuSPUrXNOTY9joCGk269L7LeZqOsqn7Kl26WR6FXwVH29lPgs4y3MLBWNBt52GuisJ1XMgH/mj3ZTZD47HrepL1RKWmpyUDgG0I3mNulIPQtZ3yCgMUJrwgMVWeoGe36YkrX20nFCJQiEsp9UEKR1ATswd/bDNK5theHM9kShdGA+ea15Bi10w2uL76QU6tAHdy9ZwGX+qe192lwwLI3D2hfhq7fYMC65ys1RgFyYsSFDndhoCpOogMYzsigt/goqfBGs4l8KLuODxMaSLzHJqxYHjrzgyeuVgNTVDqBRoN8wXF8ccEPXjBBZO5iWqTwehi3SXete2ihWbhwCRYR5GLE2/gV0vRNmgD2RB33tKi9LCpRdGLQwZMHAsIT618eudoX8fOT3hWsz/WQVZYNSzImavgN2vC4FuV3rr6dYJl99yZHs=
x-amz-user-agent:aws-sdk-js/2.249.1 callback
content-encoding;host;x-amz-content-sha256;x-amz-date;x-amz-security-token;x-amz-user-agent
UNSIGNED-PAYLOAD
上传文件的请求在我的时区中有效,但是其他用户的文件上传器有问题。用户尝试上传文件时从AWS返回的错误是
<?xml version=“1.0” encoding=“UTF-8”?> <Error>
<Code>AuthorizationHeaderMalformed</Code><Message>The authorization header
is malformed; Invalid credential date. Date is not the same as X-Amz-Date
我的工作上传者: my working uploader
来自用户端的同一上传者: error from user report
来自用户端的错误消息: error message from user report
预先感谢您的帮助,如果需要更多详细信息,请发表评论。 谢谢。