Question

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?

Was it helpful?

Solution 2

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"]

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top