I want to bring your attention to a Virtual Path Provider module we’ve built in Propeople. By default EPiServer stores all user uploaded images in a shared folder. Since our very first EPiServer project years ago, it was clear to me that we need to store these images in database. So we have built this Virtual Path Provider that uses ASP.NET infrastructure and have been able to plug it into EPiServer. It is always nice to know that the CMS system you have implemented your solution with, has a nice and pluggable architecture to fit your needs.

We have been using this Virtual Path Provider for years now, and since we find it very valuable we decided to open it to the world.

It is important to acknowledge that our implementation is based on EPiCode DatabaseFileSystem module . Unfortunately this module is only supporting EPiServer 4 which is rather old version already.

We collaborated with EPiServer Norway in order to clean up our code and make it work even better. Because of our previous requirements, we did not implement 100% all of the features that such a module such have. EPiServer helped us to find out weak spots and made code improvements.

Some of the features that we improved are:

  • deep copy and delete of files and folders
  • removing files from caches in load balanced environment
  • running under scheduler context
  • fixed threading issues
  • dumping contents of database file system
  • copy between existing VPP and database VPP

Why do we keep images in database instead of file system? Which approach you should take? Read my next blog post with more information about pros and cons.

You will be able to find the latest release of Database Virtual Path Provider at EPiServer Extras. Feel free to use it and give feedback!

UPDATE: Vladimir Terziyski from Propeople’s EPiServer team has published a nice wrap up on how to use VirtualPathUnifiedProvider in EPiServer. You can read it here.