I've just started to use GAS and I'm having issues with uploading files to a GDrive folder.
I'm using this way to read the form (html+bootstrap) file inputs and generate the files into a drive folder. There are 4 file inputs for different topics on the form.
function processForm(theForm) { //Variables from files to upload var talleres = theForm.talleres; var sistEval = theForm.sistEval; var otrosDoc = theForm.otrosDoc; var matsDigi = theForm.matsDigi; var folder = DriveApp.getFolderById(folderId); var nombTuto = theForm.curso+'_'+theForm.nombre+'_'+theForm.paterno+'_'+theForm.materno; var foldTuto = DriveApp.createFolder(nombTuto); var doc = foldTuto.createFile(talleres); var doc2 = foldTuto.createFile(sistEval); var doc3 = foldTuto.createFile(otrosDoc); var doc4 = foldTuto.createFile(matsDigi); folder.addFolder(foldTuto); DriveApp.removeFolder(foldTuto);
I've limited the file size with a js validation on the form.html to 100Mb each file, but when I try to upload more than 50Mb in total (considering the 4 files) the console of bugzilla returns the message:
NetworkError: Connection failure due to HTTP 500
And the web gets frozen, and obviously didn't save anything.
So, I need to know if i have to change the method for upload because I'm searching on the documentation of GAS page but can't find anything about "upload Quotas" or detailed information from the error 500, just like "Internal Server Error".
Sorry about my english, regards.
With the Drive Service of Google Apps Script the limit is set to 10MB per upload. I guess that the Blob function has the same limits that the others, it's an oversight from Google.
Throws an exception if content is larger than 10MB.
Issue already reported here: #552, #2806
I guess this limitation is due to the limitation of URL Fetch POST size.