I have a CPT that needs to allow for files (PDFs/docs) to be uploaded against posts. I figured I could store these as attachments, but I can't get my head around how to build a custom write box for managing attachments, and how to restrict that to certain file types. Can anyone kick start me in the right direction?