2012-09-05 5 views
1

동 기적으로 파일을 업로드 할 수있는 방법이 있습니까?파일을 동 기적으로 업로드

웹 응용 프로그램에 ASP.NET 4.0을 사용하고 있으며 파일 크기가 항상 비교적 작기 때문에 (< 100kb) 대기 시간은 문제가되지 않습니다.

답변

2

Google 드라이브 API는 동기식 파일 업로드를 지원합니다.

확인 자세한 내용은 참조 설명서의 files.insert 방법 : https://developers.google.com/drive/v2/reference/files/insert

아래 문서에서 가져온 코드 조각 :

... 
FilesResource.InsertMediaUpload request = service.Files.Insert(body, stream, mimeType); 
request.Upload(); 

File file = request.ResponseBody; 
... 

업로드가 완료되면 request.Upload에 대한 호출이 반환하고 request.ResponseBody 응답의 파일 메타 데이터를 포함합니다.

+0

Google 문서 목록 API에서 메소드를 찾고있었습니다. – seth

+0

샘플을 https://developers.google.com/google-apps/documents-list/#uploading_a_new_document_or_file_with_both_metadata_and_content에서 가져 와서 uploader.InsertAsync() 대신 uploader.Insert()를 사용하십시오. –

+0

감사합니다. 그것을 찾지 못해서 나쁘다. – seth

관련 문제