Using a Content Delivery Network
2 posts by 2 authors in: Forums > CMS Builder
Last Post: September 28, 2009 (RSS)
By (Deleted User) - September 26, 2009
Hello, I am interested in using the CMS Builder.
Is there any way I can use a content delivery network when clients upload images? For example Amazon S3 Cloud front? I realize I can upload the images myself and refer to them using their URLS but I was wondering if there was an automatic way?
Thanks Jono
Is there any way I can use a content delivery network when clients upload images? For example Amazon S3 Cloud front? I realize I can upload the images myself and refer to them using their URLS but I was wondering if there was an automatic way?
Thanks Jono
Re: [jonoc73] Using a Content Delivery Network
By Dave - September 28, 2009
Hi jonoc73,
I'm not familiar with Amazon S3 but if it works like other content delivery networks you should be fine.
CMS Builder displays an image like this:
<img src="<?php echo $upload['urlPath'] ?>" ... />
Which might display like this:
<img src="/uploads/yourImage.jpg" ... />
So you can hardcode a different domain like this:
<img src="http://E123456.cloudfront.net/<?php echo $upload['urlPath'] ?>" ... />
Which would display to the browser as:
<img src="http://E123456.cloudfront.net/uploads/yourImage.jpg" ... />
Then all you'd need to do is ensure CloudFront loads a copy of the original image off your server if it doesn't already have it cached or upload the images yourself. (We could also build you a plugin that did it automatically if needed).
Hope that helps! Let me know if you have any other questions about that.
I'm not familiar with Amazon S3 but if it works like other content delivery networks you should be fine.
CMS Builder displays an image like this:
<img src="<?php echo $upload['urlPath'] ?>" ... />
Which might display like this:
<img src="/uploads/yourImage.jpg" ... />
So you can hardcode a different domain like this:
<img src="http://E123456.cloudfront.net/<?php echo $upload['urlPath'] ?>" ... />
Which would display to the browser as:
<img src="http://E123456.cloudfront.net/uploads/yourImage.jpg" ... />
Then all you'd need to do is ensure CloudFront loads a copy of the original image off your server if it doesn't already have it cached or upload the images yourself. (We could also build you a plugin that did it automatically if needed).
Hope that helps! Let me know if you have any other questions about that.
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com