upload avatar, attachment, some api changes