1

I'm developing an Application Page using Visual Studio 2012 for a SharePoint 2010 site. One of the features of this Page is to be able to upload image files to SharePoint for a Profile Picture image.

I already have code that successfully updates the profile property that tells SharePoint 2010 where to look for the user's profile image, yet the image is not uploaded to that location.

I've already tried using an asp:FileUpload control and use its ID property to save the image to the server, but I couldn't get it to recognize the ID in the C# code behind file.

Is there something I'm missing, or an easy way to upload the image to either the SQL Server DB or SharePoint 2010 itself?

Thanks!

1 Answer 1

1

User Profile Photo is one of the property in User Profile called “PictureUrl”. All the User Profile Photos are maintained in SharePoint library in My Site called “User Photos”, for each User Profile 3 files are maintained with various dimensions (Large,Medium and Small size) in the library. You need upload the pictures there and reference the url.

here is good example: http://sharepoint-tamizha.blogspot.com.es/2013/08/update-user-profile-picture.html

1
  • I tried the example code. The FileUpload control ID reference is null in the code behind .cs file, therefore I cannot even check the file being uploaded. Any ideas? Commented Feb 9, 2017 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.