returning upload_attempt value as well