title: Form and file upload with htmlService and app script not working
body: <p>I'm trying to upload a file to a specific google drive folder along with form data into a spreadsheet. The spreadsheet portion of this code works, but the file upload function does not. Any help on fixing this would be appreciated.</p>
  
  <p><strong>Code.gs</strong></p>
  
  <pre><code>var submissionSSKey = 'SS ID';
  function doGet(e) {
        var template = HtmlService.createTemplateFromFile('Form.html');
    template.action = ScriptApp.getService().getUrl();
    return template.evaluate();
  }
  
  function doPost(e) {
    var template = HtmlService.createTemplateFromFile('Thanks.html');
    var LoanType = template.name = e.parameter.name;
    var borrower = template.department = e.parameter.department;
    var amount = template.message = e.parameter.message;
    var emailed = template.email = e.parameter.email;
    var comp = 'N/A'
  
    var sheet = SpreadsheetApp.openById(submissionSSKey).getSheets()[0];
    var lastRow = sheet.getLastRow();
    var targetRange = sheet.getRange(lastRow+1, 1, 1, 5).setValues([[comp,LoanType,borrower,amount,emailed]]);
  
    var fileBlob = e.paramater.thefile
    var doc = DriveApp.getFolderById('folder ID');
              doc.createFile(fileBlob)//.rename('New Name');
  
  
    return template.evaluate();
  
  
  }
  </code></pre>
  
  <p><strong>Form.html</strong></p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;form action="&lt;?= action ?&gt;" enctype="multipart/form-data" method="post"&gt;
      &lt;table border="0" cellpadding="1" cellspacing="0" style="width: 500px;"&gt;
      &lt;tbody&gt;
      &lt;tr&gt;
      &lt;td&gt;
      Name:&lt;/td&gt;
      &lt;td&gt;
      &lt;input name="name" type="text" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td&gt;
      Department:&lt;/td&gt;
      &lt;td&gt;
      &lt;select name="department"&gt;
      &lt;option&gt;Select Option&lt;/option&gt;
      &lt;option&gt;Cashier&lt;/option&gt;
      &lt;option&gt;Greeter&lt;/option&gt;
      &lt;option&gt;Runner&lt;/option&gt;
      &lt;option&gt;Line Control&lt;/option&gt;
      &lt;option&gt;IDB&lt;/option&gt;
      &lt;option&gt;Unknown&lt;/option&gt;
      &lt;/select&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td&gt;
      Email:&lt;/td&gt;
      &lt;td&gt;
      &lt;input name="email" type="text" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td&gt;
      Message:&lt;/td&gt;
      &lt;td&gt;
      &lt;textarea name="message" style="margin: 2px; height: 148px; width: 354px;"&gt;&lt;/textarea&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td&gt;
      &lt;p&gt;
      School Schedule (Image Files Only):&lt;/p&gt;
      &lt;/td&gt;
      &lt;td&gt;
      &lt;p&gt;
      &lt;input type="file" id="thefile" name="thefile"&gt;
      &lt;/p&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td&gt;
      &lt;input type="submit" value="Submit" /&gt;&lt;/td&gt;
      &lt;td&gt;
      You will receive an email confirmation upon submission&lt;/td&gt;
      &lt;/tr&gt;
      &lt;/tbody&gt;
      &lt;/table&gt;
    &lt;/form&gt;&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Thanks.html</strong></p>
  
  <pre><code>&lt;html&gt;
    &lt;body&gt;
      &lt;h1&gt;Thanks&lt;/h1&gt;
      &lt;p&gt;Thank you for your submission.&lt;/p&gt;
      Name: &lt;?= name ?&gt;&lt;br/&gt;
      Department: &lt;?= department ?&gt;&lt;br/&gt;
      Message: &lt;?= message ?&gt;&lt;br/&gt;
      Email: &lt;?= email ?&gt;&lt;br/&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>