Insert media into sub folder of content folder type pages

Vote:
 

Hi,

I am trying to push all media into content folder in Episerver CMS 8.

I followed this link

http://roland.kierkels.net/episerver/blob-storage-in-episerver-7-5/  which explains how to push media files into the CMS and its working fine but I ran into some problem.

I have a tree like structure of Content folder as;

Content folder1

   content folder 1.1

   content folder 1.2

ContentFolder 2

I have pushed the media file into ContentFolder1 and ContentFolder2 but i can't make this happen to contentfolder1.1 or so. when i use foloowing code i only get the list contenting ContentFolder1 and ContentFolder2.

var contentRepository = ServiceLocator.Current.GetInstance<>IContentRepository>();
    var rootFolders = contentRepository.GetChildren<>ContentFolder>(SiteDefinition.Current.GlobalAssetsRoot)
I need to push media into other sub folder as well.
Any help will be much appreciated.
Thak you
#147045
Apr 05, 2016 9:26
Vote:
 

GetChildren only gives you first level of children. Either get the children of content folder 1 or use GetDescendants function to get everything below a node

#147047
Apr 05, 2016 10:29
* 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.