title: TypeError: callback is not a function when downloading a Google Drive File
body: <p>Im using the code from this example</p>
  
  <p><a href="https://gist.github.com/Daniel15/5994054" rel="nofollow">https://gist.github.com/Daniel15/5994054</a></p>
  
  <p>The picker returns a file and when i try to download it with this function</p>
  
  <pre><code>function downloadFile(file, callback) {
    if (file.downloadUrl) {
      var accessToken = gapi.auth.getToken().access_token;
      var xhr = new XMLHttpRequest();
      xhr.open('GET', file.downloadUrl);
      xhr.setRequestHeader('Authorization', 'Bearer ' + accessToken);
      xhr.onload = function() {
        callback(xhr.responseText);
      };
      xhr.onerror = function() {
        callback(null);
      };
      xhr.send();
    } else {
      callback(null);
    }
  }
  </code></pre>
  
  <p>It throws this error</p>
  
  <p>TypeError: callback is not a function callback(null) filepicker.js(line 130)</p>