dustin10/VichUploaderBundle — pull request #22 by ftassi (2012-04-14 15:45:56+00:00)
Title: Cdn storage

I have implementad a basic CDNStorage service that will allow to store uploaded files on remote CDN (such as rackspace CloudFiles or Amazon S3).

CDNStorage implements StorageInterface and rely to an implementation of CDNAdapterInterface to communicate with the CDN.
The implementation of CDNAdapterInterface is the service that actually communicate with the CDN.
This way is possibile to configure CDNStorage with multiple CDNAdapterInterface and work with different CDN services.

I have provided an implementation of CDNAdapterInterface for Rackspace CloudFiles (which is the one I use) based on rackspace php_cloudfiles library.

I have also addded a new configuration parameter "storage" that allows to customize Storage service used by the bundle.

storage.xml configuration for vich_uploader.storage.adapter.rackspace_cloud_files relies on:
* rackspacecloudfiles_authentication
* rackspacecloudfiles_connection

which are provided by EscapeRackspaceCloudFilesBundle (it will become a dependency)

This is just a first implementation but if you like it you can merge and use it.
I would like to customize the storage service for every single mapping available (instead of using the same for al the entities and media) but I think I will need a bit of supporto con configuration structure to implement it