2011-01-24 3 views
0

google-api 용 .net 클라이언트를 사용하여 특정 폴더에 파일을 업로드하려고합니다. 내가 사용하여이 작업을 수행 할 수 있습니다 잘 작동.net api를 사용하여 Google 문서 도구에서 주어진 폴더의 파일을 업로드하고 바꿉니다.

service = new DocumentsService("SRDUploader"); 
DocumentEntry lastUploadEntry = service.UploadDocument(file, null); 

, 그러나 나는 더 많은 것을 필요 : 어떻게와 같이 "내 폴더 \ file.txt 파일을 \"시도 대상 폴더를 (지정 할 수

  1. secound arg)?
  2. 기존 파일을 덮어 쓰지 않도록 어떻게 지정할 수 있습니까?

나는 version 2 버전의 .net 클라이언트 API를 사용하고 있습니다. 다른 버전이있을 수 있습니까? 어떤 도움

Larsi

답변

0
DocumentEntry parent = ....; 
DocumentEntry deleting = ....; 

deleting.Delete(); 

string feed = string.Format(DocumentsListQuery.foldersUriTemplate, parent.ResourceId); 
// http://docs.google.com/feeds/default/private/full/{0}/contents 

var result = service.Insert(new Uri(feed), fileStream, fileExtension, fileName); 
에 대한

감사합니다

관련 문제