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.CurrentWhen we tried to use GlobalAssetsRoot both Shared Blocks and Media content were exported.
But how to export only Media?
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.
Thanks, Johan, It works!