I have thrown the following code together:
protected string GetAttachmentUrl(int versionHistoryID)
{
DataSet va = vm.GetVersionAttachments(versionHistoryID, false);
DataRow row = va.Tables[0].Rows[0];
AttachmentInfo ai = am.GetAttachmentInfo((Guid)row["AttachmentGUID"], CMSContext.CurrentSite.SiteName);
return DocumentHelper.GetAttachmentUrl(ai, versionHistoryID);
}
Which generates the following promising looking url:
http://localhost:50468/KenticoCMS.VersionTest/CMSPages/GetFile.aspx?guid=629ca50e-4fa4-41c4-aecb-2baeaa47d05b&versionhistoryid=1
However GetFile.aspx doesn't seem to be able to deal with this attachment... :(