<?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: What is the http code to write file contents in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/What-is-the-http-code-to-write-file-contents/m-p/180790#M7415</link>
    <description>&lt;P&gt;I unfortunately don't have any examples without using jQuery. Here are the examples I do have though:&lt;/P&gt;
&lt;P&gt;- &lt;A href="https://stackoverflow.com/documentation/dropbox-api/409/uploading-a-file/1360/uploading-a-file-from-text-via-jquery-in-javascript#t=201608031830056702535" target="_blank" rel="nofollow noreferrer"&gt;Uploading a file from text via jQuery in JavaScript&lt;/A&gt;&lt;BR /&gt;- &lt;A href="https://stackoverflow.com/documentation/dropbox-api/409/uploading-a-file/1359/uploading-a-file-via-jquery-in-javascript#t=201608031830056702535" target="_blank" rel="nofollow noreferrer"&gt;Uploading a file via jQuery in JavaScript&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You could review those to see how it works, and then covert them to remove the&amp;nbsp;jQuery dependency.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Aug 2016 01:34:41 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2016-08-04T01:34:41Z</dc:date>
    <item>
      <title>What is the http code to write file contents</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/What-is-the-http-code-to-write-file-contents/m-p/180789#M7414</link>
      <description>&lt;P&gt;I know how to read the contents of a dropbox file in a js variable, using pure javascript.&lt;BR /&gt;It's ajax, without the use of jquery or any dropbox or other library.&lt;BR /&gt;Similarly, I would like to create/write/update a dropbox file with data from a js variable without uploading an existing file.&lt;BR /&gt;What is the http code for this?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:31:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/What-is-the-http-code-to-write-file-contents/m-p/180789#M7414</guid>
      <dc:creator>Seppe S.</dc:creator>
      <dc:date>2019-05-29T09:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: What is the http code to write file contents</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/What-is-the-http-code-to-write-file-contents/m-p/180790#M7415</link>
      <description>&lt;P&gt;I unfortunately don't have any examples without using jQuery. Here are the examples I do have though:&lt;/P&gt;
&lt;P&gt;- &lt;A href="https://stackoverflow.com/documentation/dropbox-api/409/uploading-a-file/1360/uploading-a-file-from-text-via-jquery-in-javascript#t=201608031830056702535" target="_blank" rel="nofollow noreferrer"&gt;Uploading a file from text via jQuery in JavaScript&lt;/A&gt;&lt;BR /&gt;- &lt;A href="https://stackoverflow.com/documentation/dropbox-api/409/uploading-a-file/1359/uploading-a-file-via-jquery-in-javascript#t=201608031830056702535" target="_blank" rel="nofollow noreferrer"&gt;Uploading a file via jQuery in JavaScript&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You could review those to see how it works, and then covert them to remove the&amp;nbsp;jQuery dependency.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 01:34:41 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/What-is-the-http-code-to-write-file-contents/m-p/180790#M7415</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-08-04T01:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: What is the http code to write file contents</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/What-is-the-http-code-to-write-file-contents/m-p/180791#M7416</link>
      <description>&lt;P&gt;I just put together a simple example using just&amp;nbsp;XMLHttpRequest:&lt;/P&gt;
&lt;PRE&gt;var path = "/test_javascript_upload.txt";&lt;BR /&gt;var content = "data to upload";&lt;BR /&gt;var accessToken = "&amp;lt;ACCESS_TOKEN&amp;gt;";&lt;BR /&gt;var uploadUrl = "https://content.dropboxapi.com/2/files/upload"&lt;BR /&gt;var result;&lt;BR /&gt;&lt;BR /&gt;var xhr = new XMLHttpRequest();&lt;BR /&gt;xhr.onreadystatechange = function() {&lt;BR /&gt; if (xhr.readyState === 4) {&lt;BR /&gt; result = xhr.responseText;&lt;BR /&gt; console.log(result);&lt;BR /&gt; }&lt;BR /&gt;};&lt;BR /&gt;xhr.open("POST", uploadUrl, true);&lt;BR /&gt;xhr.setRequestHeader("Authorization", "Bearer " + accessToken);&lt;BR /&gt;xhr.setRequestHeader("Content-type", "application/octet-stream");&lt;BR /&gt;xhr.setRequestHeader("Dropbox-API-Arg", '{"path": "' + path + '"}');&lt;BR /&gt;xhr.send(content);&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Aug 2016 05:49:55 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/What-is-the-http-code-to-write-file-contents/m-p/180791#M7416</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-08-04T05:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: What is the http code to write file contents</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/What-is-the-http-code-to-write-file-contents/m-p/180792#M7417</link>
      <description>&lt;P&gt;This is it! What a delight. &lt;BR /&gt;With just a little bit of code we have a simple filesystem at our disposal for async storage in a local dropbox folder, with all the dropbox goodies on top. &lt;BR /&gt;The feature is browser independent and works from a local as well as a remote hosted script, but the dropbox site must be available online. &lt;BR /&gt;I assume that many developers will be very happy with this feature: Create, Delete, Read and Write folders and files in a local dropbox folder, without the need for code from an external library.&lt;/P&gt;
&lt;P&gt;Note: the "overwrite" tag is needed to replace a file: xhr.setRequestHeader("Dropbox-API-Arg", '{"path": "' + path + '","mode":{".tag":"overwrite"}}');&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 19:09:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/What-is-the-http-code-to-write-file-contents/m-p/180792#M7417</guid>
      <dc:creator>Seppe S.</dc:creator>
      <dc:date>2016-08-04T19:09:08Z</dc:date>
    </item>
  </channel>
</rss>

