I had a requirement in the past to take media library files and convert them to page types with attachments. Below is a snippet of the code for v8.2 that you're looking for to create the attachment and update the document.
//add the attachment to the document
AttachmentInfo newAttachment = null;
// Path to the file to be inserted. This example uses an explicitly defined file path. However, you can use an object of the HttpPostedFile type (uploaded via an upload control).
string filePath = MediaLibraryPath + @"\" + mediaFile.FileName + mediaFile.FileExtension;
// MediaLibraryPath is something like this: C:\inetpub\wwwroot\sitename\media\PDF-files\Meeting Minutes
// Insert the attachment and update the document with its GUID
newAttachment = DocumentHelper.AddUnsortedAttachment(newNode, Guid.NewGuid(), filePath, tree, ImageHelper.AUTOSIZE, ImageHelper.AUTOSIZE, ImageHelper.AUTOSIZE);
newNode.SetValue("FileAttachment", newAttachment.AttachmentGUID);
DocumentHelper.UpdateDocument(newNode);
newNode.Publish();