I'm running URLFetchApp Requests to an Amazon S3 Server to pull Audio Files and relocate them to Google Drive. The HTTPResponse comes back in XML format.
I run the following code to convert into a workable blob that can be stored in Google Drive:
/*driveAppFolder, fileName, response are pre-defined variables from earlier in the program*/
var responseBlob = response.getBlob();
var driveAppFile = driveAppFolder.createFile(blob).setName(fileName);
This code works flawlessly up to a certain size. I haven't figured out the limitation yet, but I know a 50MB file (52657324 bytes) will prevent the blob from generating with the error:
InternalError: Array length 52389150 exceeds supported capacity limit.
I realize a similar JavaScript error was handled here, but I am locked in the confines of Google Apps Script currently. Is there a way I can work around this sort of limitation and get the blob made?