One approach would be to use a control adapter to add some controls to the file summary edit /add control
You would register your adapter in the AdapterMappings.browser file as follows:
<browsers>
<browser refID="Default">
<controlAdapters>
...
<adapter controlType="EPiServer.UI.Hosting.EditCustomFileSummary"
adapterType="MyLibrary.Adapters.FileSummaryAdapter, MyLibrary" />
</controlAdapters>
</browser>
</browsers>
You would then need to create a control class that derives from ControlAdapter
public class FileSummaryAdapter : ControlAdapter
{
}
Within here you can create and add you own controls to the 'wrapped' EditCustomFileSummary, here's an example I have used previously to add a Tags control to the file summary dialog:
// Override the OnInit method to ensure our controls are added to the edit control
protected override void OnInit(EventArgs e)
{
// Some code omitted for clarity
...
// Reference our edit controls
EditControl = Control as EditCustomFileSummary;
UnifiedFile selectedFile = EditControl.SelectedFile;
SaveButton = EditControl.FindControl("SaveButton") as ToolButton;
// Hook into the save event so we can save the input from our custom controls
SaveButton.Click += OnSaveButtonClick;
...
_tagsControl.Text = selectedFile.Summary.Dictionary["Tags"].ToString();
...
EditControl.Controls.Add(_tagsControl);
}
Then you would be able to hook into the save event triggered by the 'Save' control in the summary dialog in order to save your custom field as a dictionary item on the files summary property
public void OnSaveButtonClick(object sender, EventArgs e)
{
// Get a reference to the current file and the summary data
UnifiedFile selectedFile = EditControl.SelectedFile;
// Get the tags added
selectedFile.Summary.Dictionary["Tags"] = _tagsControl.Text;
}
How and what controls you add can of course be derived by whatever method works for your scenario.