views:

93

answers:

1

I have just set up file uploads to Amazon S3 using Rails 3 and Paperclip. All this works amazingly well and is up and running. There is just one small detail that I would like to sort out. At the moment, the urls are the amazon urls (ie start http://s3.amazonaws.com) and I would like them to begin with my domain.

I have already added the neccesary CNAME records to my DNS and they are working fine so I can access the files via a subdomain of my domain. The problem is just that the URLs generated by paperclip start with the amazon domain. Is there an easy way to change the paperclip config to get round this?

Cheers

+1  A: 

Take a look at Paperclip::Storage::S3.

Justice
Specifically `:s3_alias_url`
Andrew Vit
Thanks for that. I had already had a look at this and couldn't get it going but after your prompt looked again with renewed vigour and found a Google Groups post that cleared up the problem for me. Have posted the link in case anyone else is stuck on the same thing. Cheers guys. https://groups.google.com/group/paperclip-plugin/browse_thread/thread/e1acd8339490438c?pli=1
Addsy
Maybe it's a DNS option?
AnApprentice