1
votes

I get files from google drive(Using Java) Everything works! BUT, when I see pdf documents mime type

file.getMimeType()

it is something like that: application/vnd.google-apps.document it is not application/pdf

Question 1: Why is my pdfs at google drive with mime type application/vnd.google-apps.document

Question 2:

I need to filter my document, in order to get only PDF documents: but this does not works! Googel thinks that my PDF is "vnd.google-apps.document"!

 String mime ="application/pdf"; //works when I set vnd.google-apps.document
 String query="'"+id+"'" +" in parents and trashed=false and and mimeType="+mime;
 FileList files = service.files().list().setQ(query).execute();
1
When the PDF files were uploaded, were they uploaded with convert=true, or convert=false?pinoyyid

1 Answers

1
votes

I've been reading a number of comments recently that Drive PDFs have become editable. So my guess is that you uploaded your PDFs with convert=true, and so Drive has converted them to docs. To prevent this, make sure that convert=false.