Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //using our client context, load the folder of the files we want links to
- Folder folder = Program.spConnection.context.Web.GetFolderByServerRelativeUrl(Properties.Settings.Default.SPImages);
- FileCollection filec = folder.Files;
- Program.spConnection.context.Load(filec);
- Program.spConnection.context.ExecuteQuery();
- List<string> allSharedURLs = new List<string>();
- //Load Each File in the folder
- foreach (File f in filec)
- {
- Program.spConnection.context.Load(f);
- Program.spConnection.context.ExecuteQuery();
- // I would like to add the publically shared url to the list at this point
- // allSharedURLs.Add( theLink );
- }
- var item = //code to get list item..
- var objSharingInfo = ObjectSharingInformation.GetObjectSharingInformation(
- clientContext, item, false, true, false, true, true, true, true);
- clientContext.Load(sharingInfo);
- clientContext.ExecuteQuery();
- //objSharingInfo.AnonymousEditLink
- //objSharingInfo.AnonymousViewLink
Add Comment
Please, Sign In to add comment