Chúng tôi đang sử dụng mã này để tạo ra các yêu cầu và đặt tên tập tin để tải về:Làm thế nào để sử dụng các ký tự unicode trong tiêu đề phản hồi-content-phân phối của S3?
var request = new GetPreSignedUrlRequest()
.WithBucketName(S3BucketName)
.WithExpires(requestExpirationTime)
.WithKey(file.S3Key)
.WithResponseHeaderOverrides(
new ResponseHeaderOverrides()
.WithContentDisposition("attachment; filename=\"Unicode FileName ᗩ Test.txt\""));
này tạo liên kết sau:
/s3path?AWSAccessKeyId=xxxx&Expires=1377199946&response-content-disposition=attachment%3B%20filename%3D"Unicode%20FileName%20ᗩ%20Test.txt"&Signature=xxxxx
Mà cho lỗi này:
<Error>
<Code>InvalidArgument</Code>
<Message>
Header value cannot be represented using ISO-8859-1.
</Message>
<ArgumentValue>attachment; filename="Unicode ᗩ filename.txt"</ArgumentValue>
<ArgumentName>response-content-disposition</ArgumentName>
<RequestId>368BD60502854514</RequestId>
<HostId>
BiUUYp4d9iXfK68jKVxWZEp25m5je166M0ZY1VmoPk9pN9A69HLHcff6WIVLWk1B
</HostId>
</Error>
Làm cách nào chúng tôi có thể sử dụng các ký tự không phải ISO-8859-1, chẳng hạn như unicode, trong tiêu đề phản hồi-nội dung-bố trí?
AWS Diễn đàn chủ đề: https://forums.aws.amazon.com/thread.jspa?threadID=133257 –