I am trying to download the file through google picker the pdf and docx extension files are getting downloaded perfectly fine.
But the issue I am facing is that while selecting the doc extension file the object return file size as zero. In other words ‘PickerCallBack’ function of API provide the correct mime type but the file size is zero in response.
Have a look at screen shot in which we can see file size is zero.
Click here to view Response information screen shot
So if I continue this process by using the file ID & authentication token I am able to get the download ULR which is then passed to below PHP code.
$request = new Google_Http_Request($downloadUrl, 'GET', null, null);
Then using this request object if you try to get the file content it returns empty.
$httpRequest = $service->getClient()->getAuth()->authenticatedRequest($request);
$httpRequest->getResponseBody();
Reference: https://developers.google.com/drive/v2/web/manage-downloads#examples
Note: All this process is working fine for pdf and docx extension, only issue is with doc extension files.
So I need to know what I should do so that I would be able to get the file content in response of doc extension files.