0

I'm using googles drive API to download files of spreadsheet type. This works just fine except for when I try to download it in text/csv.

Is should be supported according to this page: https://developers.google.com/drive/v3/web/manage-downloads

So this code works fine:

var request = gapi.client.drive.files.export({
  'fileId': fileId,
  'mimeType': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
})
request.then(function(response) {
  console.log(response);
}, function(err) {
  console.log('Error');
  console.log(err.result.error);
});

This code doesn't:

var request = gapi.client.drive.files.export({
  'fileId': fileId,
  'mimeType': 'text/csv'
})
request.then(function(response) {
  console.log(response);
}, function(err) {
  console.log('Error');
  console.log(err.result.error);
});

The error I get from the server is:

  • domain: "global"
  • message: "Internal Error"
  • reason: "internalError"

Does anyone know what could be the reason for this?

1 Answer 1

1

This is a known issue with the Drive API v3, and it has been raised with the engineering team. Please follow this issue for updates.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.