aws-samples/Intelli-Agent

在web portal上传文档时,会有跨域的问题。

Closed this issue · 2 comments

错误见截图。
image

bucket 的 CORS 也没有问题。
[ { "AllowedHeaders": [ "*" ], "AllowedMethods": [ "GET", "POST", "PUT", "DELETE" ], "AllowedOrigins": [ "*" ], "ExposeHeaders": [], "MaxAgeSeconds": 0 } ]

根据repost的意见,配置完bucket的CORS权限,需要等待一段时间才能生效。
stackover flow上有人提到是90分钟。 我实际测试,同一套代码部署,等2小时候可以上传。

参考:

https://stackoverflow.com/questions/56517156/s3-presigned-url-works-90-minutes-after-bucket-creation

https://repost.aws/questions/QUbRJA9UqWRNuUTq5ujzXdOw/cors-error-when-trying-to-upload-via-presigned-url-from-browser-but-not-in-non-browser-environment