Help Center/
Meeting/
Client SDK Reference/
macOS SDK/
APIs/
Account Operations/
Uploading a Profile Picture
Updated on 2024-07-30 GMT+08:00
Uploading a Profile Picture
uploadSelfAvatar: success: fail:
API Description
This API is used to upload a profile picture.
Precautions
- Pass the profile picture path.
- The maximum size is 200 KB.
- Only JPG and PNG files are supported.
- The recommended aspect ratio is 1:1.
- success: Success. fail: Failure. error: Error information.
Method Definition
1
|
- (void)uploadSelfAvatar:(NSString *)path success:(void (^)(void))success fail:(void (^)(NSError *error))fail; |
Parameter Description
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
path |
Yes |
NSString |
Full path of an image. |
Return Values
None
Sample Code
1 2 3 4 5 6 7 8 |
/// Upload a profile picture. - (void)uploadSelfAvatar { [[HWMBizSdk getBizOpenApi] uploadSelfAvatar:path success:^{ NSLog(@"set succeeded"); } fail:^(NSError *_Nonnull error) { NSLog(@"%@", error.description); }]; } |
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