0

I try to use Drive.Files.insert() for making more than 50mb csv in Google app script.(using Drve API) the error message is Empty response. I read reference but there is no answer to do that. here is code.

 var optionalArgs = { 
     uploadType: 'resumable',
    }; 
 var resource = {
                     title: fileName,
                     parents: [],
     };
 Drive.Files.insert(resource, blob, optionalArgs);

thank you for reading my message.

Jescanellas
  • 2,555
  • 2
  • 9
  • 20
skyblue
  • 1
  • 1
  • 1
    At Google Apps Script, the maximum blob size is 50 MB (52,428,800 bytes) and `Drive.Files.insert` cannot be used for the resumable upload. Unfortunately, this is the current specification. By the way, where is the CSV data you want to create as a CSV file? – Tanaike May 08 '20 at 01:59
  • thank you for answering my question. I put each spreadsheet data in this code. temp.push(contents); csv += temp.join(',') + "\r\n"; var blob = Utilities.newBlob('', contentType, fileName) .setDataFromString(csv); do you have any suggestion about that? thank you so much – skyblue May 08 '20 at 12:42

0 Answers0