file upload handling and avatar upload finished