Setup custom Sitecore MediaProvider

One of Sitecore’s most useful features is the plug-ability of functionality via the configuration factory. Its very easy to add or update custom implementations where necessary.

A typical programming model used throughout this is the Provider model – Membership, Roles, Item, Proxy… the list is endless. Unfortunately one provider thats not exposed in the config factory is the MediaProvider.

No problem, thanks to some help from support they suggested a way to get around this, you can tap into the initialise pipeline. Here is the patch file to enable this:

This pipeline runs as the application intializes. Next you need the implementation of the pipeline processor:

And finally the custom implementation:

Our customization allowed us to push certain media extensions to known file types.

6 thoughts on “Setup custom Sitecore MediaProvider

  1. I really like your blog.. very nice colors & theme. Did you design this website yourself or did you hire someone to do it for you? Plz reply as I’m looking to create my own blog and would like to know where u got this from. many thanks

Leave a Reply

Your email address will not be published. Required fields are marked *