Added a separate function for avatar upload