title: Generate multiple URL
body: <p>I am working with the Google drive Picker API, where a user select a document, and then the URL is generated as a text. </p>
  
  <p>I have already enabled multi-select, where user can select multiple documents in one instance, but the problem is that I am only able to generate one URL.</p>
  
  <p>Below is the code:</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  
            // The Browser API key obtained from the Google Developers Console.
        var developerKey = 'ID';
  
        // The Client ID obtained from the Google Developers Console.
        var clientId = 'ID';
  
        // Scope to use to access user's photos.
        var scope = ['https://www.googleapis.com/auth/drive'];
  
        var pickerApiLoaded = false;
        var oauthToken;
  
        // Use the API Loader script to load google.picker and gapi.auth.
        function onApiLoad() {
          gapi.load('auth', {'callback': onAuthApiLoad});
          gapi.load('picker', {'callback': onPickerApiLoad});
        }
  
        function onAuthApiLoad() {
          window.gapi.auth.authorize(
              {
                'client_id': clientId,
                'scope': scope,
                'immediate': false
              },
              handleAuthResult);
        }
  
        function onPickerApiLoad() {
          pickerApiLoaded = true;
          createPicker();
        }
  
        function handleAuthResult(authResult) {
          if (authResult &amp;&amp; !authResult.error) {
            oauthToken = authResult.access_token;
            createPicker();
          }
        }
  
        // Create and render a Picker object for picking user Photos.
        function createPicker() {
          if (pickerApiLoaded &amp;&amp; oauthToken) {
            var picker = new google.picker.PickerBuilder().
                addView(google.picker.ViewId.PDFS).
                enableFeature(google.picker.Feature.MULTISELECT_ENABLED).
  
                setOAuthToken(oauthToken).
                setDeveloperKey(developerKey).
                setCallback(pickerCallback).
                build();
            picker.setVisible(true);
          }
        }
  
        // A simple callback implementation.
        function pickerCallback(data) {
          var url = 'nothing';
          if (data[google.picker.Response.ACTION] == google.picker.Action.PICKED) {
            var doc = data[google.picker.Response.DOCUMENTS][0];
            url = doc[google.picker.Document.URL];
          }
          var message =  url;
          document.getElementById('result').innerHTML = message;
        }
      &lt;/script&gt;
  </code></pre>
  
  <p>Below is the html found in the body</p>
  
  <pre><code>&lt;div id="result"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I think the issue lies below:</p>
  
  <pre><code>function pickerCallback(data) {
          var url = 'nothing';
          if (data[google.picker.Response.ACTION] == google.picker.Action.PICKED) {
            var doc = data[google.picker.Response.DOCUMENTS][0];
            url = doc[google.picker.Document.URL];
          }
          var message =  url;
          document.getElementById('result').innerHTML = message;
        }
  </code></pre>