Answers for "set image on server with changing"

0

set image on server with changing

public static async setAvatar(avatar: ImageFile) {
    const userData = await AuthService.getUserData();

    return this.handleRequestData<void>(
      this.post(
        `${ApiUrls.setAvatarImage}/${userData?.id}`,
        this.objectToFormData({
          user_id: userData?.id,
          avatar_url: getFileObjectForImage(avatar),
        }),
        { headers: FORM_DATA_HEADER },
      ),
    );
  }
Posted by: Guest on September-16-2021

Code answers related to "set image on server with changing"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language