refactoring appears to support media

Updated to upload and link media files…. need to more thoroughly test