Migrate to MediaData of course ;)
If you don't want to migrate the files, you can expose them trough a content provider instead. See:
And you need to refactor some of the code for sure. This should have been done when you upgraded to 7.5 since thats when they introduced the new mediadata. When that was introduces they marked as warnings that you should start use the other system instead.
A recommendation is to actually plan for this migration when going to 7.5 in the future. And follow Johans links above :)
Actually we have moved a lot to MediaData. But, there are cases we are using "UnifiedFile" like:
var dir = HostingEnvironment.VirtualPathProvider.GetDirectory(directoryPath) as UnifiedDirectory; ..... var file = HostingEnvironment.VirtualPathProvider.GetFile(filePath) as UnifiedFile; ..... unifiedFile.BypassAccessCheck = true; unifiedFile.Summary.Dictionary["Some Metadata Field"] = "Some Value"; updatedFile.Summary.SaveChanges();
So, what I want to know is, is it possible to find a solution using a content provider to above scenarios or do we have to use sort of replacement class/library for "UnifiedFile" ?
In that case it's less work to migrate to MediaData. Otherwise you need to develop a content provider with write functionality and then store metadata in a seperate database.
We do have a quite old EPiServer system and it has been updated to 6, 7, 7.5, 8, 8.1 and 9 during the course. But, in the EpiServer 9, because of removing support for "UnifiedFile" completely, we are in a sort of problematic situation. We do have quite a lot code base that is dealing with "UnifiedFile".
So, what would be the approach that we need to take in order to escape from current situation ?