+ Start a Discussion
Sure@DreamSure@Dream 

Uploading chatter profile photo from visualforce page

Hi All,

We are having out of the box feature to upload chatter profile picture.
I am having a requirement, where the user will be allowed to upload the profile pic using visualforce page.

But dont know how to proceed.
Could you guys help me with this?

Thanks,
Vinita_SFDCVinita_SFDC
Hi,

I have not tried it out so i do not have sample code but this is possible by using setPhoto method of chatterUsers class. This method sets the user photo to be the specified, already uploaded file.

Refer: https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_ConnectAPI_ChatterUsers_static_methods.htm
Sure@DreamSure@Dream
Thanks Vinita for ur prompt response.

Will check this and let you know.

Thanks
ArabindaArabinda
Hi ,
Can you please post some code for the above question.How you did it or any idea how to achieve it?
Marty C.Marty C.
Hello, everyone, here's a link to a similar question (https://developer.salesforce.com/forums/?id=906F0000000AX3nIAG) from Arabinda, where I've shared a possible answer, using a ConnectApi.ChatterUsers method to update a user's profile photo.
Greg CookGreg Cook
I tried Marty's solution and it works great.