AWS S3/Accelerated bucket upload fails ONLY for slow connection users

Jas*_*enX 13 amazon-s3 amazon-web-services

We're enabling our users to upload videos onto our S3 bucket. It's been fitted with the "acceleration" option and using Multi-Part upload from our JS. However, we've noticed something very disturbing: We have thousands of successful uploads from countries where the Internet is fast.

However, virtually all slow connection users (who all happen to be from places the internet isn't famous for speed) fail to upload. Once they do begin to upload they get dozens these errors on their console and the upload gets stuck and fails.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://our-secret-bucket-xxxxxx.s3-accelerate.amazonaws.com/tyoeu/Abbey%…BAYmLRf4.YqtrWLwkD9uc5wGp0.rpyIV6xqDHxHqNaEsaxQTMAHs3g8DXdL3. (Reason: CORS request did not succeed).
Run Code Online (Sandbox Code Playgroud)

The CORS setup for this bucket is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedMethod>PUT</AllowedMethod>
    <AllowedMethod>POST</AllowedMethod>
    <AllowedMethod>GET</AllowedMethod>
    <AllowedMethod>HEAD</AllowedMethod>
    <MaxAgeSeconds>43200</MaxAgeSeconds>
    <ExposeHeader>ETag</ExposeHeader>
    <AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
Run Code Online (Sandbox Code Playgroud)

We help the upload failed users manually by asking them to upload to dropbox and share a link with us -- but this is just another proof something is wrong -- if they can upload to Dropbox with their slow connections, why can't they upload to AWS/S3? This has been gnawing at our souls for quite some time now and we can't understand what's wrong.

Surely we're not the only company on planet Earth allowing folks from around the world to upload large files. Why are we failing with slow connection users?

ket*_*ham 3

看来这可能是请求超时问题,您是否尝试更改您的aws.config.httpOptions.timeout?默认值为两分钟,但您可以通过将其设置为零来完全删除超时。有关这方面的更多信息可以在这里找到。

编辑以修复损坏的链接。