title: Google Drive Advanced API - Insert File cause Exception: Empty response
body: <p>I've newer from Google Script and trying to establish a script supporting anonymous upload to Drive (<a href="https://ctrlq.org/code/19747-google-forms-upload-files" rel="nofollow noreferrer">https://ctrlq.org/code/19747-google-forms-upload-files</a>). </p>
  
  <p>What I've done so far is able to run the script and found out <code>folder.createFile(blob)</code> function cannot upload with filesize more than 10Mb. I then found out using Advanced Drive Service(Drive API) may able to provide the fix, so I change using Advanced Service(<code>Drive</code> rather than <code>DriveApp</code>) (<a href="https://developers.google.com/drive/v2/reference/files/insert#http-request" rel="nofollow noreferrer">https://developers.google.com/drive/v2/reference/files/insert#http-request</a>). However, It then response the error <code>Exception: Empty response</code>. </p>
  
  <p>Here is my code.</p>
  
  <pre><code>function uploadFiles(form) {  
    try {   
      var blob = form.file;
      var contentType = blob.type;    
      var folderName = "Ｕpload Folder";
      var folder, folders = DriveApp.getFoldersByName(folderName);
  
      if (folders.hasNext()) {
        folder = folders.next();
      } else {
        folder = DriveApp.createFolder(folderName);
      }
  
      var file = {
        title: blob.name,
        mimeType: contentType,
        parents:[{id:folder.getId()}]
      };
  
      var options = {
          uploadType: "multipart"
      };
  
      file = Drive.Files.insert(file, blob, options);           
      return "File uploaded successfully " + file.fileSize;
  
    } catch (error) {
  
      return error.toString();
    }
  }
  </code></pre>
  
  <p>It can upload &lt;10Mb file by using above code(on both uplaodType: <code>media</code> and <code>multipart</code>). However, >10Mb still failed, would it be needed to use <code>resumable</code>?</p>
  
  <p>Remark: I've noticed there was a question similar to the issue I've encountering(<a href="https://stackoverflow.com/questions/31388711/advanced-drive-service-returning-empty-response-error-when-inserting-file">Advanced Drive Service returning Empty Response Error when inserting file</a>), but seems there is no conclusion at that point, so I wish somebody can help fixing this issue</p>