In the Google Drive, there are types of files. One is the general files, the other is so called the Google Doc. Google will automatically transform the .doc, .xls, .ppt, .txt and other file types to Google Doc unless otherwise specified. If you try to download these files using API, you will have the following error.
403 Forbidden
{
"error": {
"errors": [
{
"domain": "global",
"reason": "fileNotDownloadable",
"message": "Only files with binary content can be downloaded. Use Export with Google Docs files.",
"locationType": "parameter",
"location": "alt"
}
],
"code": 403,
"message": "Only files with binary content can be downloaded. Use Export with Google Docs files."
}
}
This makes the downloading process very difficult because in this case we can't differentiate the different file types and output the exact file format. (For example, .doc will mixup with .docx)
One possible way is to entirely ignore the google doc part
In the Google Drive, there are types of files. One is the general files, the other is so called the Google Doc. Google will automatically transform the .doc, .xls, .ppt, .txt and other file types to Google Doc unless otherwise specified. If you try to download these files using API, you will have the following error.
This makes the downloading process very difficult because in this case we can't differentiate the different file types and output the exact file format. (For example, .doc will mixup with .docx)
One possible way is to entirely ignore the google doc part