S3 Upload with Vanity Domains


(Brian Gillespie) #1

Feature Request:
Add a checkbox to the S3 section of the settings page labeled “Use vanity domains”. Selecting that checkbox would cause URLs from the image uploader to have the form:

//[bucket-name]/[image]
instead of
//[bucket-name].s3.amazonaws.com/[image]

We’ve used S3 extensively, and have found that some of our customers cannot access content on s3.amazonaws.com - their corporate firewalls disallow it.

However, if we use a vanity domain, those same corporate customers can see the files.

We’re absolutely loving the work you’re doing - thanks!


Uploads to S3 + CDN with vanity name
Allow Custom URLS for S3
(Brian Gillespie) #2

@zogstrip - any chances of fixing this one? I see where to hack it into the javascript, but I’m not very good getting settings to show up in the settings page of Discourse and wiring those settings to the javascript.


(Régis Hanol) #3

Not sure I understand. When enabled, you want the bucket-name to be the domain of all the uploads?


(Brian Gillespie) #4

Yes, that’s correct. Documentation from Amazon is here.

We have DNS entries configured so that http://usercontent.mcneel.com resolves to our S3 bucket by the same name. That means the following image can be accessed with both of the following URLs:

http://usercontent.mcneel.com.s3.amazonaws.com/2894cba04d00c54cf0c7b82bce87467e3832bbc25b5.jpg


The latter decouples our images from the rest of the s3.amazonaws.com universe of links, and makes it likely that our customers can see images on our domain, even though s3.amazonaws.com is (perhaps reasonably) blocked by corporate policy.

Thanks for considering this.


(Chris Mohritz) #5

@BrianGillespie did you find an automated resolution here? we’re still having to manually change file names


(Brian Gillespie) #6

Nope. Still no resolution.


Brian Gillespie


(Chris Mohritz) #7

that’s a bummer; is a simple update.
aws domain prevents pinning to pinterest as well.
thanks for the quick response.


#8

Any updates on this, or a workaround of some kind?


(Régis Hanol) #9

We recently did some work to improve our S3 support and I can finally say that you can now use S3 with a “vanity domain” via the s3_cdn_url site setting :wink:


S3 upload bucket, cdn url and bucket name in CNAME
(Régis Hanol) #10

This topic was automatically closed after 24 hours. New replies are no longer allowed.