Providing a more understandable explanation for ‘s3 use cdn url for all uploads‘ setting


I noticed the setting “s3 use cdn url for all uploads” has the description as “Use CDN URL for all the files uploaded to s3 instead of only for images.”

The term “instead” above in this context could lead users to believe that enabling this setting would apply the CDN URL to all file types, excluding images, which can cause confusion.

A potential rephrase to avoid this misunderstanding might be:

‘Enable CDN URL for all files uploaded to S3, extending its use to more than just image files.’

Just a suggestion to improve the descriptions.

I think the inclusion of ‘only for’ already makes that distinction?

‘Instead of images’ would be exclusion.

‘Instead of only for images’ would be an expansion.

only for is fine, but the issue is the word instead makes the whole sentence unclear. So the combination of instead of only for becomes unclear.

I don’t know how native english speakers read that, but I’m quite sure rest of world understand what word all means.

Totally other question is that I know out there is admins who are totally convinced that just changing url will upgrade S3 to thoroughbred CDN.

1 Like

I’m not sure. :thinking: I’m normally the first to say ‘let’s see if we can make that clearer’, but I think this one reads perfectly fine.

‘It does this for all instead of only for some’

1 Like

It was just a suggestion. The word “Instead” made the sentence bit unclear to me. So I made my suggestion and opinion :slightly_smiling_face: It’s alright that you chose to agree to disagree. All good.

1 Like

FWIW … this is what Bert (GPT-4 Settings explorer) has to say about it:

The ‘s3_use_cdn_url_for_all_uploads’ setting in Discourse allows you to use a Content Delivery Network (CDN) URL for all files that are uploaded to Amazon S3, not just images. By default, this setting is turned off.

In more detail, when a file is uploaded to your Discourse site, it is typically stored in a local or cloud storage system, such as Amazon S3. The URL of the uploaded file is then used to access and display the file on your site.

However, if you have a CDN set up, you can choose to use the CDN’s URL instead of the direct S3 URL. A CDN is a network of servers that delivers web content to users based on their geographic location, the origin of the webpage, and a server. This can help to speed up the delivery of content to users.

The ‘s3_use_cdn_url_for_all_uploads’ setting controls whether Discourse should use the CDN URL for all uploaded files, or just for images. If you enable this setting, Discourse will use the CDN URL for all uploads, not just images. This can be beneficial if you have a lot of non-image files being uploaded to your site, as it can help to speed up the delivery of these files to your users.

This setting is located in the ‘/config/site_settings.yml’ file, and its default value is ‘false’, meaning that by default, Discourse will not use the CDN URL for all uploads.

The code that controls this setting is located in the ‘/lib/file_store/s3_store.rb’ file. This code checks if the ‘s3_use_cdn_url_for_all_uploads’ setting is enabled, and if it is, it uses the CDN URL for the uploaded file. If the setting is not enabled, it uses the direct S3 URL for the file.

Please note that this setting will only have an effect if you have a CDN set up and you are using Amazon S3 for your file storage. If you are using local storage or another cloud storage provider, this setting will not have any effect.


Use a Content Delivery Network (CDN) URL for all files that are uploaded to S3, not just images.


Use CDN URL for all the files uploaded to s3 instead of only for images.

I kind of like Bert’s revised description … but it feels like a bit of a wash … expanding CDN is nice imo and it reads a bit clearer to me.

1 Like

Thank you for your reply.

Yes GPT4 version is much more clearer and written in simple English. Further, I see it has a good flow.

1 Like