--Code logic for upload document