<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Chooser - Set dropbox file as input type file value in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Chooser-Set-dropbox-file-as-input-type-file-value/m-p/261986#M15287</link>
    <description>Can you elaborate on what exactly isn't working for you? For example, is the success callback getting called? What error do you get?&lt;BR /&gt;&lt;BR /&gt;It looks like you're to set the value of some element to files[0], but each element in that array is a JSON object as documented here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/chooser#response" target="_blank"&gt;https://www.dropbox.com/developers/chooser#response&lt;/A&gt;</description>
    <pubDate>Tue, 23 Jan 2018 15:45:29 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2018-01-23T15:45:29Z</dc:date>
    <item>
      <title>Chooser - Set dropbox file as input type file value</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Chooser-Set-dropbox-file-as-input-type-file-value/m-p/261942#M15277</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the chooser to allow the user to select a file which then should be set as the value of an input type=file of a form. Right now I'm trying to do this within the chooser success callback but doesn't work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;function DropboxChooser(selector)
{
    options = {

        // Required. Called when a user selects an item in the Chooser.
        success: function (files) {&lt;BR /&gt;        // Also tried with the files property of the input
            document.querySelector(selector).value = files[0];
        },

        // Optional. Called when the user closes the dialog without selecting a file
        // and does not include any parameters.
        cancel: function () {

        },

        // Optional. "preview" (default) is a preview link to the document for sharing,
        // "direct" is an expiring link to download the contents of the file. For more
        // information about link types, see Link types below.
        linkType: "direct", // or "direct"

        // Optional. A value of false (default) limits selection to a single file, while
        // true enables multiple file selection.
        multiselect: false, // or true

        // Optional. This is a list of file extensions. If specified, the user will
        // only be able to select files with these extensions. You may also specify
        // file types, such as "video" or "images" in the list. For more information,
        // see File types below. By default, all extensions are allowed.
        extensions: ['.pdf', '.doc', '.docx'],
    };
    Dropbox.choose(options);
}&lt;/PRE&gt;&lt;P&gt;What I'm missing here?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:15:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Chooser-Set-dropbox-file-as-input-type-file-value/m-p/261942#M15277</guid>
      <dc:creator>gdiazderada</dc:creator>
      <dc:date>2019-05-29T09:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Chooser - Set dropbox file as input type file value</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Chooser-Set-dropbox-file-as-input-type-file-value/m-p/261986#M15287</link>
      <description>Can you elaborate on what exactly isn't working for you? For example, is the success callback getting called? What error do you get?&lt;BR /&gt;&lt;BR /&gt;It looks like you're to set the value of some element to files[0], but each element in that array is a JSON object as documented here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropbox.com/developers/chooser#response" target="_blank"&gt;https://www.dropbox.com/developers/chooser#response&lt;/A&gt;</description>
      <pubDate>Tue, 23 Jan 2018 15:45:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Chooser-Set-dropbox-file-as-input-type-file-value/m-p/261986#M15287</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-01-23T15:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Chooser - Set dropbox file as input type file value</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Chooser-Set-dropbox-file-as-input-type-file-value/m-p/262007#M15288</link>
      <description>&lt;P&gt;The callback is being fired properly, the problem is it seems I cannot set the files property of an input of type file since it's readonly.&lt;/P&gt;&lt;P&gt;I got a form with an input file so the user can upload files from the computer. Also wanted to give the user the ability to upload files from the Dropbox picker, but I'm not sure how to handle that in terms of form submission and handling.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 16:57:13 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Chooser-Set-dropbox-file-as-input-type-file-value/m-p/262007#M15288</guid>
      <dc:creator>gdiazderada</dc:creator>
      <dc:date>2018-01-23T16:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Chooser - Set dropbox file as input type file value</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Chooser-Set-dropbox-file-as-input-type-file-value/m-p/262008#M15289</link>
      <description>&lt;P&gt;Thanks for following up with the additional information. It sounds like the Dropbox portion of this is working properly then, so I'm afraid I can't be of much help.&lt;BR /&gt;&lt;BR /&gt;From your description, you're having trouble with the rest of the HTML/JavaScript work to be done with your app. That's outside the scope of Dropbox API support unfortunately.&lt;BR /&gt;&lt;BR /&gt;For reference though, the Dropbox Chooser returns link(s) for the selected file(s) back to your app, not File objects or file data. (That way, all of the file data doesn't need to be sent through the user's browser.) What you do with those is up to you, but you generally would just send the link(s) up to your server, i.e., as text, not files.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 17:01:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Chooser-Set-dropbox-file-as-input-type-file-value/m-p/262008#M15289</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-01-23T17:01:25Z</dc:date>
    </item>
  </channel>
</rss>

