April 2016
Beginner
338 pages
7h 38m
English
Sitecore provides you with the facility to download individual files from the Content Editor. Sometimes, content authors might need to download the whole media library or media files of any selected folders in a ZIP file. In this recipe, you will learn how to use Sitecore APIs to download the whole media library folder along with media metadata.
We will first create a Command class to download the media library folder:
SitecoreCookbook project, create a new DownloadMediaLibraryFolder class in the Commands folder and inherit it from the Command class.Execute() method of the class as follows:public override void Execute(CommandContext context) { if (context.Items.Length == 1) { ...