Google 문서 API를 사용하고 있습니다.Google 문서 API
DocsService service = new DocsService(APP_NAME);
service.query(qry, DocumentListFeed.class);
List<DocumentListEntry> docEntries = docFeed.getEntries();
for(DocumentListEntry entry : docEntries)
{
System.out.println(entry.getQuotaBytesUsed());
}
문서의 크기를 얻으려면 위 코드를 사용하고 있습니다.
Google에 문서를 업로드하면 크기가 커집니다. 문서/스프레드 시트/드로잉/프리젠 테이션/양식을 만들면 크기가 0이됩니다.
다음 질문에 대한 해결책이 필요합니다. 1. 생성 된 Google 문서의 적절한 파일 크기를 얻는 방법 2. 스프레드 시트와 양식을 구별하는 방법? 둘 다 스프레드 시트로 entry.getType()을 얻고 있습니다.
제발 도와주세요. 미리 감사드립니다. 양식을 요청할 때
양식과 스프레드 시트를 구분할 수있는 Java 코드를 제공해 주시겠습니까? –
https://developers.google.com/drive/v2/reference/files/get는 파일 메타 데이터를 검색하는 방법을 보여줍니다. 그런 다음'file.getMimeType()'에서 값을 확인해야합니다. –