Change Media Service to store in Azure Blob

Topics: Administration, Core, Writing modules
May 28, 2012 at 1:15 PM

Hi, I want to override the Media Service functionality( Or Storage Provider) to save the media uploaded on azure blob rather than on local file system. I know I have to create an IStorageProvider Implementation but how can I configure Orchard to instantiate My Custom Storage Provider Implementation rather than FileSystemStorageProvider




May 28, 2012 at 1:23 PM

Normally you can override implementations by declaring dependency in your module's Module.txt on the module with the default implementation. This will take care of your implementation being registered after the default one, thus overriding it.

As far as I can remember, FileSystemStorageProvider is a core class, so you should use the OrchardSuppressDependeny attribute on you class, feeding it the whole name (including namespace) of the implementation you want to override.

May 29, 2012 at 8:58 AM

Thanx Piedone. It works