blob.getDataAsString() Size Limit in Google Apps S

2019-07-09 05:04发布

问题:

What is the file size limit for using blob.getDataAsString()? I can't seem to find any documentation anywhere on this.

I'm currently saving JSON data in a large (102MB) json file I save to Google Drive, which I attempt to read and parse back to JSON. Before that step, I read the file via file.getBlob() and then use .getDataAsString() to read the blob contents. Here's my code:

 var jsonFile = DriveApp
               .getFolderById(fileId)
               .getFilesByName("masterAsset.json")
               .next(); //A 102MB .json file
 var blob = jsonFile.getBlob();
 var text = blob.getDataAsString();

Currently, I'm getting this error: "File masterAsset.json exceeds the maximum file size."

Does anyone know what the maximum file size is for .getDataAsString()?