Updated on 2024-07-30 GMT+08:00

Uploading a Profile Picture

Function

This API is used to upload a profile picture to the address book on the meeting server. Precautions: 1. Call this API only when you have logged in. 2. Upload a PNG or JPG image no more than 200 KB. 3. The recommended aspect ratio is 1:1.

Function Prototype

uploadSelfAvatar(selfAvatarInfo: SelfAvatarInfo, onUploadSelfAvatarResult?: (ret: SDKERR, reason: string) => void): voiduploadSelfAvatar(selfAvatarInfo: SelfAvatarInfo, onUploadSelfAvatarResult?: (ret: SDKERR, reason: string) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
selfAvatarInfo Yes SelfAvatarInfo Personal profile picture information.
onUploadSelfAvatarResult Yes (ret: SDKERR, reason: string) => void Callback of uploading the personal profile picture.
Table 2 SelfAvatarInfo
Parameter Mandatory Type Description
path Yes string Full path of the image.

Return Values

void

Callback Method Parameters

(ret: SDKERR, reason: string) => void

Table 3 Input parameter description
Parameter Type Description
ret For details about SDKERR, see Error Code Reference. Error code.
reason string Error description.