update before upload