Modified uploadAPI.