title: Moving google apps script to v8 file upload stopped working from sidebar
body: <p>I have an HTML sidebar in a Google spreadsheet with a file upload input field that doesn't work with the new v8 engine.  It <em>does</em> work in the old runtimeVersion DEPRECATED_ES5.</p>
  <p>The file upload in the sidebar is for uploading a single file to my google drive.</p>
  <h2>Html file</h2>
  <pre><code>&lt;body&gt;
  &lt;h1&gt;File Uploader&lt;/h1&gt;
  &lt;form&gt;
      &lt;input type=&quot;file&quot; name=&quot;myFile&quot; id=&quot;file&quot;&gt;
      &lt;br&gt;
      &lt;input class=&quot;blue&quot; type=&quot;button&quot; id=&quot;submitBtn&quot; value=&quot;Upload File&quot; onclick=&quot;uploadthis(this.parentNode)&quot;&gt;
      
  &lt;/form&gt;
  
  &lt;input type=&quot;button&quot; value=&quot;Close&quot; onclick=&quot;google.script.host.close()&quot; /&gt;
  
  &lt;script&gt;
    
  function uploadthis(fileForm){
  
  google.script.run
  .uploadFiles(fileForm)
  }
  
  
     
  &lt;/script&gt;
      
  &lt;/body&gt;
  </code></pre>
  <p>And here the simplified gs</p>
  <pre><code>function uploadContract() {
    var html = HtmlService.createHtmlOutputFromFile('ContractUpload').setTitle('Kontrakt upload').setWidth(300);
  SpreadsheetApp.getUi().showSidebar(html);
  }
  
  function uploadFiles(data){
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sStamdata = ss.getSheetByName('Stamdata_New');
  var contractFolderId = sStamdata.getRange('D60').getValue(); 
  var idag = Utilities.formatDate(new Date(), &quot;GMT+1&quot;, &quot;yyyyMMdd&quot;);
  var title = sStamdata.getRange('D52').getValue();
  
  var file = data.myFile;
  var folder = DriveApp.getFolderById(contractFolderId);
  var createFile = folder.createFile(file);
  createFile.setName(idag+&quot; - KONTRAKT - &quot;+title);
  
  }
  </code></pre>