SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any easy way to upload documents/pictures into a users "My Site" Shared Documents/Pictures? Maybe using the user profile service?

The only way I can think to accomplish this is to first get the location of the users "My Site" and then look for the Shared Documents (or Pictures) list and if it is there, do my upload. Will this even work or is there an easier way?

share|improve this question

Shared Documents in a My Site is a Document Library like any other, so you have the same options you would with a Document Library elsewhere. What permissions you have on those Document Libraries is obviously important, as they typically owned by the My Site owner.

Your approach might be different if the My Sites don't exist yet, or if they are a lot of them, etc. It's not really clear from your question exactly what you're trying to accomplish from a requirements perspective.

share|improve this answer
If you are doing it for the current user you can get the location of their MySite from their User Profile. – Chris Beckett May 3 '11 at 10:37
My goal is this (in a nut shell). I have my main intranet site, MyMainSite and on that site I want to make a web part that allows users to upload photos that become part of a photo gallery. But I was thinking it would make sense to store these photos in each users own "My Site" shared picture library instead of storing them on MyMainSite. So I was hoping there was a really easy way for me to just get programmatic access to the users shared MySite picture library. Sounds like I'm going to have to use the User Profile to get the MySite address & then do an OpenSite etc. Any other options? – TehOne May 3 '11 at 16:58
Sounds workable. Yes, use the User Profile, get the MySite location and then open the SPList for their Shared Picture library. Since the Web Part will be executing in the user's security context, you should not have any permission issues. – Chris Beckett May 3 '11 at 17:13
up vote 0 down vote accepted

For future reference, the easiest way I found to get access to the users "My Site" lists was through the UserProfile. Like this...

ProfileLoader profileLoader = ProfileLoader.GetProfileLoader();
UserProfile userProfile = profileLoader.GetUserProfile();
userProfile.PersonalSite.RootWeb.Lists["Shared Pictures"]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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