Try our conversational search powered by Generative AI!

SiteMediaRoot does not exist in SiteDefinition



We want to export only medias from existing database

by adding ExportSource to dataExporter.SourceRoots.

We expected to see SiteMediaRoot mentioned in the article

but it does not exist in EPiServer.Web.SiteDefinition.Current
When we tried to use GlobalAssetsRoot both Shared Blocks and Media content were exported.

But how to export only Media?




Jan 15, 2014 22:59

The documentation is not correct, there is a SiteAssetRoot that contain both media, folders and blocks (and possibly other content).

There is an event EPiServer.Enterprise.DataExporter.ContentExporting 

you can set up an eventhandler for. In the argument of type ContentExportingEventArgs you can check if the content is not media or folder then you can set Cancel=true on the event args to prevent the content from being exported.

Note however that the content it self is not part of the argument so you load it using argument ContentLink to find the actual type.

Jan 17, 2014 12:01

Thanks, Johan, It works!

Jan 17, 2014 15:37
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.