Updated the upload document module and degist utils