Just spent the day trying to do this, having not really written sharepoint code before. Seeing as it took most of the day to figure out, and perfect, I thought I would post the solution in case I ever needed to repeat this again... In the customised UploadAtlasDocument.aspx
Read More...