나는 다음과 같은 DLL을 사용하여 비즈니스/for SharePoint를 원 드라이브에 파일을 업로드하려고 한 마이크로 소프트 오피스 365 DLL을 함께 셰어에 파일을 업로드하려면 어떻게 :나는
Microsoft.Office.Oauth
Microsoft.Office365.SharePoint을 ;
Microsoft.Office365.SharePoint.Extensions;System.Exception : { "개체를 찾을 수 없습니다"}
이 코드를 실행하려고하면public async void UploadDataAsync(byte[] bytes, string fileName) { // NAME: TestFolder, ID: TestFolder, URL: /personal/[company]_onmicrosoft_com/Documents/TestFolder, SIZE: 0 UserInformation userInformation = new UserInformation(); userInformation.Id = "Castrovalva"; userInformation.Name = "Castrovalva"; Microsoft.Office365.SharePoint.File file = new Microsoft.Office365.SharePoint.File(); file.CreatedBy = userInformation; file.LastModifiedBy = userInformation; file.Id = fileName; file.Name = fileName; file.Url = "/personal/[company]_onmicrosoft_com/Documents/TestFolder"; file.TimeCreated = DateTime.Now; file.TimeLastModified = DateTime.Now; file.ETag = "ETAG"; using (MemoryStream memory = new MemoryStream(bytes)) { await file.UploadAsync(memory); } }
내가이 오류 : 다음 코드
출처 : Microsoft.Office365.SharePoint
내가 이해할 수없는 것은 코드를 실행하기 위해 SharePointClient (클라이언트가 Sharepoint에 연결됨) 개체를 필요로하지 않는다는 것입니다.
모든 파일 정보를 얻고 싶거나 연결해야하는 경우이 개체를 사용하기 때문에.
_client = await EnsureClientCreated();
_client.Context.IgnoreMissingProperties = true;
그래서 내가 어떻게 비즈니스/for SharePoint를 원 드라이브에 파일을 업로드합니까?
는 당신이 비디오에 몇 가지 예제 코드를 볼 수 있습니다
이 답변 주셔서 감사합니다, 수 당신은 어느 특정 시간에 대답이 – Brampage
나 자신에게 당신의 도움에 대한 감사의 감사를 발견했다. – Brampage