This sample illustrates how to add a media block type to the CMS. This assumes you have a Article page type but really you just need to pass in a ContentLink to the location you want to save the file to.
Below are some sample methods to add a new blob and insert data into it.
//article is a page type (used to get the content link)
public string AddFile(Article article, HtmlFile file)
string url = "";
DescriptionThis is a sample template that uses Find and UnifiedSearch() to return the results.ResolutionCode Download
To use, unzip into the site root and browse to the page.http://mysite.com/UnifiedSearchTest.aspx?query=alloy
This was tested on Alloy 10.x.
This article contains the code segment that can retrieve all languages tied to a fallback language configured in the cms.
ContentLanguageSettingsHandler.Instance.Get(ContentReference.StartPage).Where(s => s.LanguageBranchFallback.Contains("de", StringComparer.OrdinalIgnoreCase)).Select(s => s.LanguageBranch);
The first parameter in the Contains will be changed to the fallback language of interest.