1
votes

We use Google Drive Java Client API, Oauth 2.0, and Google Apps Domain Wide Delegation and incremental Upload

File, PDF is in Google Drive (no problems in upload) but Google Drive Web Client Preview PDF is not available (also happens with .doc and .docx files).

No preview available for PDF file

Is there a way of using Google Drive API as if the user uploads directly file? Where is the "bad" configuration that prevents "preview" from appearing? Dowloading file works perfect (as I tell before upload).

3

3 Answers

1
votes

grabbing at straws, but I notice your Mime type is in upper case (APPLICATION/PDF). When I look at pdfs in my Drive, the mime type is lower case (application/pdf).

1
votes

Something else has to be going on here because I get the exact same thing but my mimeType is lowercase already.

1
votes

I Added this in my web.config to fix the issue. Works every time now.

<basicHttpBinding>
    <binding maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text">
      <readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    </binding>
  </basicHttpBinding>