Dealing with "UnifiedFile" in EPiServer 9

Vote:
 

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 ?

#140547
Oct 22, 2015 14:44
Vote:
 

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 :)

#140570
Oct 22, 2015 18:39
Vote:
 

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" ?

#140581
Edited, Oct 23, 2015 10:46
Vote:
 

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.

#140582
Oct 23, 2015 11:37
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.