I have a contentarea where one can point out a media folder and it will list all files under that root, like this:
private IEnumerable GetMediaDataFilesFromRoot(ContentReference folder)
{
if (folder == null)
{
return new List();
}
return contentLoader.GetDescendantsOfType(folder);
}
The problem is that when listing files from a root instead of "dragging and dropping" them onto the contentarea itself, is that EpiServer will not detect the files as "being in use". However, when I drop a file directly to the contentarea it gets marked as in use. Is it possible to modify this setting programmatically so all of the children files of my desired root will get marked as "in use" as well?
I have a contentarea where one can point out a media folder and it will list all files under that root, like this: