ListItem
의 driveItem
문서 라이브러리는 항상 null
입니다. 파일의 사용자 정의 필드를 얻는 방법은 무엇입니까? 콘텐츠 스트림과 파일 필드를 가져 오는 함수를 만들고 싶습니다.
var client = GetAuthenticatedClient();
var driveItems = await client.Sites[siteId].Drives[driveId].Root.Children.Request().GetAsync();
foreach (var driveItem in driveItems)
{
//ListItem is always null
if (driveItem.ListItem!=null)
{
//get columns
var blabla = driveItem.ListItem.Fields.AdditionalData["blabla"];
}
//SharepointIds is always null too
if (driveItem.SharepointIds != null)
{
}
//get file to download
var file = await client.Drives[driveId].Items[driveItem.Id].Content.Request().GetAsync();
}
ListItem을 DriveItem에 명시 적으로 추가해야합니다.
var driveItems = await client.Sites[siteId].Drives[driveId].Root.Children.Request().Expand(item => item.ListItem).GetAsync();
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다