title: Trying to link the Dropbox File Upload API to a basic HTML form file Input
body: <p>I am trying to use the <code>Dropbox Javascript Chooser</code> to allow users to choose files within their dropbox accounts that they can upload on a form on my website.</p>
  
  <p>So far I've gotten the button displaying and I can go into my dropbox and select a file. However what I haven't figured out is how I can link the file I've selected to one of the forms file inputs. </p>
  
  <p>Basically, the functionality I'd be looking to achieve is the same as the standard <code>type=file</code> input but the user selects the file from Dropbox instead. </p>
  
  <p>This is my code which is not working for me, I've checked in the Dev console and can't see any errors being rendered. </p>
  
  <pre><code>&lt;script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="xxxxx000111"&gt;&lt;/script&gt;
      &lt;script&gt;
  
          $(document).ready(function () {
              options = {
                  // Required. Called when a user selects an item in the Chooser.
                  success: function (files) { //Place it in the file upload
                      alert("Here's the file link: " + files[0].link)
                      $('#fileToUpload')[0].files[0] = files[0].link;
                  }
              };
              var button = Dropbox.createChooseButton(options);
              document.getElementById("buttonholder").appendChild(button);
          });
  
      &lt;/script&gt;
      &lt;div id="buttonholder"&gt;&lt;/div&gt;
      &lt;form&gt;
              My File: &lt;input type="file" name="fileToUpload" id="fileToUpload"&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>Does anyone have any suggestions as to where I am going wrong ? I've also tried selecting a file and emailing the form contents to myself but this does not work either. I just can't seem to figure out how to integrate the Dropbox API with the HMTL form. </p>