Help Center/
Meeting/
Client SDK Reference/
Windows SDK/
API Reference/
Account Operations/
Uploading a Profile Picture
Updated on 2024-07-30 GMT+08:00
Uploading a Profile Picture
UploadSelfAvatar
API Description
This API is used to upload a profile picture to the address book on the meeting server.
Precautions
- Call this API only when you have logged in.
- Upload a JPG or PNG image no more than 200 KB.
- The recommended aspect ratio is 1:1.
Method Definition
1
|
HWM_SDK_AGENT_API hwmsdk::HwmErrCode UploadSelfAvatar(const HwmSelfAvatarInfo *selfAvatarInfo); |
Callback Function
1
|
virtual void OnUploadSelfAvatarResult(hwmsdk::HwmErrCode ret, const char* reason) {}; |
Parameter Description
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
path |
Yes |
char[] |
Full path of the image. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
/** * Upload a profile picture. */ int demoUploadSelfAvatarDlg::UploadSelfAvatar() { int ret; // Enter the profile picture parameters. string path= "to/path/image.png"; hwmsdkagent::HwmSelfAvatarInfo selfAvatarInfo{}; strncpy_s(selfAvatarInfo.path, path.c_str(), HWM_MAX_FILE_PATH_LEN); // Call the API for uploading a profile picture. ret = hwmsdkagent::UploadSelfAvatar(&selfAvatarInfo); return ret; } |
Parent topic: Account Operations
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot