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?