Issue with topic/posts images

Ok it stops working on enabling s3 uploads. I think the issue might be S3 replication to another bucket that has Cloudflare CDN. I implemented this weird solution because Discourse did not allow dots in S3, preventing me from doing it the right way.

I think it will be great if Discourse used non-cdn S3 URL to download/crop/manipulate/thumbnail images.
My delay due to replication might be preventing it from working???

Struggle continues…