3 ms·
I think this is a better suggestion: https://github.com/rumblelabs/asset_sync https://github.com/rumblelabs/asset_sync It uploads all your assets to S3 during
by Michikono 14y ago
I think this is a better suggestion: https://github.com/rumblelabs/asset_sync https://github.com/rumblelabs/asset_sync
It uploads all your assets to S3 during pre-compile. It keeps ALL of the asset loading logic off your application.
Also, it uploads .gz versions of all assets.
- jbaudanza 14y agoThere are a few reasons I don't do this. For one, deploys take longer. Also S3 isn't able to negotiate the Accept-Encoding header. So you have to assume that all your clients will be able to handle gzipped assets. You can use your app as a root origin for your assets, and then use something like CloudFront to offload most of the work.
- Michikono 14y agoFor the record, serving assets off S3 directly isn't a good idea. We use cloud front for that as well. Making the actual app the root origin is a good idea though. Need to think a little about the full ramifications of that versus simply having the S3 asset bucket the origin.