After enabling direct S3 upload, we are getting reports from users in China being unable to upload images — it gets stuck at 0% and times out.
The first thought could be that S3 may be blocked in China, but we know for a fact it’s not the case — at least not fully: our users from China can see the images stored in S3 just fine (bucket in eu-central-1 region in our case). But, somehow, only the upload does not seem to work.
This is hard to debug while not being behind the GFW, but some of our users in China mentioned that one perhaps relevant difference seems to be that images are being loaded using the dual-stack endpoint, but the upload uses the regular (IPv4 only) endpoint (bucket-name.s3.dualstack.eu-central-1.amazonaws.com vs bucket-name.s3.eu-central-1.amazonaws.com). From some tests, we see that indeed that seems to be the case but I’m not sure if that’s intended or required for upload purpose.
More telling perhaps is that some reported that by adding an IP resolved from the dualstack hostname to their hosts file (for the non-dualstack name hostname) fully overcome the problem and they were able to upload with just that change.
Not sure if the Discourse team has someone located in China that can help debug this better?