Blackblaze&Cloudflare: image uploading works, but not showing in post

It seems I screwed up with configuring CDN URL with Cloudflare.

I’m using Blackblaze as S3 bucket.

Image uploading works fine, but in post it shows incorrect path for an image, hence it’s not showing up. I guess this is due to wrong configuration with Cloudflare.

Note: I haven’t done any changes to app.yml mentioned here and didn’t do any rebaking yet.

I created an example post at

When I try to open an image in a tab, it’s trying to open image from the address
https://cdn.kyrgyz.club/original/1X/df20411cc37e6e627202d7cdc4d2e5e3cb077701.jpeg

But correct URL is
https://f002.backblazeb2.com/file/kyrgyzclub-uploads-bucket/original/1X/df20411cc37e6e627202d7cdc4d2e5e3cb077701.jpeg

Now, let me show my settings.

Discourse side

Cloudflare side

Blackblaze side

I think the CDN url (in Discourse) should point to the same path as the root of your bucket.

Try changing s3 cdn url from https://cdn.kyrgyz.club to https://cdn.kyrgyz.club/file/kyrgyzclub-uploads-bucket (because the CNAME points cdn.kyrgyz.club to the backblaze domain, f002.backblazeb2.com, not to your specific bucket).

The file: https://f002.backblazeb2.com/file/kyrgyzclub-uploads-bucket/original/1X/df20411cc37e6e627202d7cdc4d2e5e3cb077701.jpeg

Can be accessed at: https://cdn.kyrgyz.club/file/kyrgyzclub-uploads-bucket/original/1X/df20411cc37e6e627202d7cdc4d2e5e3cb077701.jpeg

2 Likes

Wow, thank you, Lucas!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.