final changes to fileupload functionality.