Added max list size circumvention for file transfers between sites.

This commit is contained in:
Dev
2026-05-13 15:58:16 +02:00
parent 4b51c8e3c3
commit 5d305ccc4c
27 changed files with 996 additions and 145 deletions
@@ -42,6 +42,7 @@ public class SystemGroupTargetResolver : ISystemGroupTargetResolver
_ => null
};
}
catch (OperationCanceledException) { throw; }
catch (Exception ex)
{
Log.Debug("System group target resolution failed for {Kind} on {Site}: {Error}",
@@ -97,7 +98,7 @@ public class SystemGroupTargetResolver : ISystemGroupTargetResolver
return new SystemGroupTarget(SystemGroupKind.SharingLink, file.Name, url, linkType);
}
}
catch (ServerException) { /* fall through */ }
catch (ServerException ex) { Log.Debug("File by ID not found for {Id} on {Site}: {Error}", itemUniqueId, ctx.Url, ex.Message); }
// 2. Try as folder on current web.
try
@@ -109,7 +110,7 @@ public class SystemGroupTargetResolver : ISystemGroupTargetResolver
var url = BuildAbsoluteUrl(ctx.Url, folder.ServerRelativeUrl);
return new SystemGroupTarget(SystemGroupKind.SharingLink, folder.Name, url, linkType);
}
catch (ServerException) { /* fall through */ }
catch (ServerException ex) { Log.Debug("Folder by ID not found for {Id} on {Site}: {Error}", itemUniqueId, ctx.Url, ex.Message); }
// 3. Search-index fallback — covers items moved to a different subsite or
// deleted recently (the index may lag the deletion by minutes/hours).
@@ -168,6 +169,7 @@ public class SystemGroupTargetResolver : ISystemGroupTargetResolver
path,
linkType);
}
catch (OperationCanceledException) { throw; }
catch (Exception ex)
{
Log.Debug("UniqueId search fallback failed for {Item} on {Site}: {Error}",