November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
The DataExporter class has a property FileTransfer that you can call method TryAddFile on. So what you need to do is to use EPiServer.Web.Hosting.GenericHostingEnvironment.VirtualPathProvider.GetDirectory("~/GlobalFiles") to get the root directory. Then you need to recursively traverse the structure below the root folder and call TryAddFile for each file.
In the upcoming CMS 7.5 files will also be handled as IContent implementations so then it will simply be a call to:
dataExporter.SourceRoots.Add(new ExportSource(SiteDefinition.CurrentOrDefault.GlobalMediaRoot, ExportSource.RecursiveLevelInfinity));
I want to be able to export all files in the File Library when exporting, even if the file is not linked on any particular content item.
I have been able to hook into the DataExporter.Exporting event but I can't find how to include Global Files as a source.
Can anyone point me in the correct direction?
Here is what i have so far (obviously not working code)