//save additional backup file
//Parameters 1. filename, 2. document stream, 3. use-compression, 4. It should be Additional files as shown below
var fileGuid = Ebex.EdiPortal.Common.BackupFilesToDB.BackupFiles.SaveFile(fileName, additionalFileStream, true, Ebex.EdiPortal.Common.BackupFilesToDB.FileType.AdditionalFiles);
// Link the file with document
//Parameters 1. document id of the document we want to link this additional file 2. fileGuid of the saved backup file 3. type. whether its a message, log file etc 4. Notes
Ebex.EdiPortal.Common.Tracking.AdditionalDocumentBackupFileInfo.Create(documentsId, fileGuid, "Control message", "Linked backup file with the document for message control");