아래 내 코드 문서가 성공적으로 생성 된실패는
DocsService client = new DocsService("testappv1");
client.setUserCredentials(username, password);
client.setProtocolVersion(DocsService.Versions.V2);
File file = new File("C:/test.jpg");
DocumentEntry newDocument = new DocumentEntry();
newDocument.setTitle(new PlainTextConstruct("test"));
String mimeType = DocumentListEntry.MediaType.fromFileName(file.getName()).getMimeType();
newDocument.setMediaSource(new MediaFileSource(file, mimeType));
newDocument = client.insert(destFolderUrl, newDocument);
입니다 자바 API를 통해 Google 문서로 이미지 파일을 업로드 할 수 있지만, 아무것도 포함하지 않았다.
내가 그 가정 것을 어떻게하지 않도록, 중요하다고 생각 다음 시도 빈 텍스트 문서가 생성 되었습니까? 이거 줬어? 또는 파일을 일반 이미지로 업로드 하시겠습니까? – Jacxel
이미지가 포함 된 Google 문서 형식 문서를 만들고 싶습니다. 이미지 파일을 google-doc로 직접 드래그하는 것과 같습니다. 내 Google doc 설정에서 – user1335794