title: Upload image into Google Drive via Web App and save correspondent link on spreadsheet
body: <p>This is my first approach with js and html coding, please be as much simple as possible!</p>
  
  <p>I want to improve the form developed in my web App making possible to upload image. My goal is to:</p>
  
  <ul>
  <li>Add input type file on my web App</li>
  <li>Send the file to server side</li>
  <li>Save the file in the G Drive, take the link and save it in Google Sheet</li>
  </ul>
  
  <p>To do this I have already added in my html a file input area, but I'm not sure about how I may manage it in script section.</p>
  
  <p>All the information added in the form are send to server in an object called <code>measureInfo</code> and I want to maintain this routine. When I try to add </p>
  
  <pre><code>measureInfo.media = document.getElementById('fileUpload').files
  </code></pre>
  
  <p>it doesn't run and console return `Failed due to illegal value in property: media.</p>
  
  <p>Here I report some string of code that may help to answer. If you have some suggests about how manage file in server side with DriveApp please share! </p>
  
  <pre class="lang-js prettyprint-override"><code>   &lt;script&gt;
              measureInfo.media= document.getElementById('fileUpload').files
  
              google.script.run.sendToDatabase(measureInfo);
  &lt;/script&gt;
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form action="#"&gt;
      &lt;!-- Upload File --&gt;
      &lt;div class="file-field input-field"&gt;
          &lt;div class="btn-large blue darken-3"&gt;
              &lt;span&gt;Media&lt;/span&gt;
              &lt;input type="file" id= 'fileUpload' name ='fileUpload'&gt;
          &lt;/div&gt;
          &lt;div class="file-path-wrapper"&gt;
              &lt;input class="file-path validate" type="text" placeholder = 'Upload Media'&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>