<?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: Dropbox API upload in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/336794#M19607</link>
    <description>&lt;P&gt;Oh I c&lt;/P&gt;&lt;P&gt;&lt;A href="https://content.dropboxapi.com/2/files/upload" target="_blank"&gt;https://content.dropboxapi.com/2/files/upload&lt;/A&gt;&lt;/P&gt;&lt;P&gt;doesn't exist anymore.&lt;/P&gt;&lt;P&gt;Anyone know where we upload to now?&lt;/P&gt;</description>
    <pubDate>Sun, 31 Mar 2019 19:08:36 GMT</pubDate>
    <dc:creator>Yariazen1</dc:creator>
    <dc:date>2019-03-31T19:08:36Z</dc:date>
    <item>
      <title>Dropbox API upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/336717#M19602</link>
      <description>&lt;P&gt;var file = new File([data], filename, {&lt;BR /&gt;type: "type/plain",&lt;BR /&gt;});&lt;BR /&gt;&lt;BR /&gt;var ACCESS_TOKEN = access token;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;xhr.open('POST', '&lt;A href="https://content.dropboxapi.com/2/files/upload" target="_blank" rel="noopener"&gt;https://content.dropboxapi.com/2/files/upload&lt;/A&gt;', true);&lt;BR /&gt;xhr.setRequestHeader('Authorization', 'Bearer ' + ACCESS_TOKEN);&lt;BR /&gt;xhr.setRequestHeader('Content-Type', 'application/octet-stream');&lt;BR /&gt;xhr.setRequestHeader('Dropbox-API-Arg', JSON.stringify({&lt;BR /&gt;path: filename&lt;BR /&gt;}));&lt;BR /&gt;&lt;BR /&gt;xhr.send(file);&lt;/P&gt;&lt;P&gt;this doesn't work anymore.&amp;nbsp; Was working last week.&amp;nbsp; Any ideas on what the issue is?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:07:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/336717#M19602</guid>
      <dc:creator>Yariazen1</dc:creator>
      <dc:date>2019-05-29T09:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox API upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/336718#M19603</link>
      <description>&lt;P&gt;To be more specific, it works but dropbox refuses my request&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2019 23:25:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/336718#M19603</guid>
      <dc:creator>Yariazen1</dc:creator>
      <dc:date>2019-03-30T23:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox API upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/336794#M19607</link>
      <description>&lt;P&gt;Oh I c&lt;/P&gt;&lt;P&gt;&lt;A href="https://content.dropboxapi.com/2/files/upload" target="_blank"&gt;https://content.dropboxapi.com/2/files/upload&lt;/A&gt;&lt;/P&gt;&lt;P&gt;doesn't exist anymore.&lt;/P&gt;&lt;P&gt;Anyone know where we upload to now?&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2019 19:08:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/336794#M19607</guid>
      <dc:creator>Yariazen1</dc:creator>
      <dc:date>2019-03-31T19:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox API upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/336795#M19608</link>
      <description>&lt;P&gt;Actually that's not the problem after all&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2019 19:11:46 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/336795#M19608</guid>
      <dc:creator>Yariazen1</dc:creator>
      <dc:date>2019-03-31T19:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox API upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/337025#M19621</link>
      <description>&lt;P&gt;[Cross-linking for reference:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/55451478/xhrhttprequest-to-dropbox-xhr-failed-loading-options" target="_blank" rel="noopener"&gt;https://stackoverflow.com/questions/55451478/xhrhttprequest-to-dropbox-xhr-failed-loading-options&lt;/A&gt;&amp;nbsp;]&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;&lt;A href="https://content.dropboxapi.com/2/files/upload" target="_blank" rel="noopener"&gt;https://content.dropboxapi.com/2/files/upload&lt;/A&gt; endpoint is still the correct way to upload files (smaller than 150 MB). I just tried it, and it is working for me. If something's not working for you, be sure to print out the response body for an error message.&lt;/P&gt;
&lt;P&gt;Here's a simple example of using it via a&amp;nbsp;XMLHttpRequest in Javascript.&lt;/P&gt;
&lt;PRE&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;

&amp;lt;body&amp;gt;

    &amp;lt;form&amp;gt;
      &amp;lt;input id="fileInput" type="file" name="file" onchange="uploadFile"&amp;gt;
    &amp;lt;/form&amp;gt;

    &amp;lt;script type="text/javascript"&amp;gt;
        var fileInput = document.getElementById('fileInput')
        fileInput.onchange = function(event) {

            accessToken = "ACCESS_TOKEN_HERE";

            // * file = file object selected in the file widget.
            var file = fileInput.files[0];

            var xhr = new XMLHttpRequest();

            xhr.onload = function() {
              if (xhr.status === 200) {
                var fileInfo = JSON.parse(xhr.response);
                console.log(fileInfo);
              }
              else {
                var errorMessage = xhr.response || 'Unable to upload file';
                console.log(errorMessage);
              }
            };

            xhr.open('POST', 'https://content.dropboxapi.com/2/files/upload');
            xhr.setRequestHeader('Authorization', 'Bearer ' + accessToken);
            xhr.setRequestHeader('Content-Type', 'application/octet-stream');
            xhr.setRequestHeader('Dropbox-API-Arg', JSON.stringify({
              path: '/' +  file.name
            }));

            xhr.send(file);
        };
    &amp;lt;/script&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 20:55:58 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/337025#M19621</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-04-01T20:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox API upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/337032#M19622</link>
      <description>&lt;P&gt;Thx, the above works for me too, but when I copy it line for line into my code, it just doesn't work anymore.&amp;nbsp; Same with my original question in stackoverflow.&amp;nbsp; They both work but just not in my main script for whatever reason&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 21:19:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/337032#M19622</guid>
      <dc:creator>Yariazen1</dc:creator>
      <dc:date>2019-04-01T21:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox API upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/337126#M19626</link>
      <description>&lt;P&gt;It looks like the&amp;nbsp;Dropbox API itself and the code to call it are working as expected, so I'm afraid I can't offer much more insight. It sounds like there's something in your app that is interfering with the proper execution of the call.&lt;/P&gt;
&lt;P&gt;You'll need to debug your app's code and environment further to track down the issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 15:23:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/337126#M19626</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-04-02T15:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox API upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/337381#M19633</link>
      <description>&lt;P&gt;Problem was I was doing this from local host.&amp;nbsp; Once I stuck it on a server, everything worked perfectly.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 03:05:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API-upload/m-p/337381#M19633</guid>
      <dc:creator>Yariazen</dc:creator>
      <dc:date>2019-04-04T03:05:00Z</dc:date>
    </item>
  </channel>
</rss>

