<?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 The Dropbox API V2 not compatible with React Native in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/The-Dropbox-API-V2-not-compatible-with-React-Native/m-p/226203#M12335</link>
    <description>&lt;P&gt;I am not able to use the filesUpload endpoint with react native.&lt;/P&gt;&lt;P&gt;Simply because it is not possible with React Native to set the content type to one of the 'Content-Type' header accepted by the API. I get the following error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error in call to API function "files/upload": Bad HTTP "Content-Type" header: "application/octet-stream; charset=utf-8". &amp;nbsp;Expecting one of "application/octet-stream", "text/plain; charset=dropbox-cors-hack&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any workaround ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not alone with this problem:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/square/okhttp/issues/3081" target="_blank"&gt;https://github.com/square/okhttp/issues/3081&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/square/okhttp/blob/master/okhttp/src/main/java/okhttp3/RequestBody.java#L53" target="_blank"&gt;https://github.com/square/okhttp/blob/master/okhttp/src/main/java/okhttp3/RequestBody.java#L53&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/facebook/react-native/issues/14445" target="_blank"&gt;https://github.com/facebook/react-native/issues/14445&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:21:32 GMT</pubDate>
    <dc:creator>matt-42</dc:creator>
    <dc:date>2019-05-29T09:21:32Z</dc:date>
    <item>
      <title>The Dropbox API V2 not compatible with React Native</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/The-Dropbox-API-V2-not-compatible-with-React-Native/m-p/226203#M12335</link>
      <description>&lt;P&gt;I am not able to use the filesUpload endpoint with react native.&lt;/P&gt;&lt;P&gt;Simply because it is not possible with React Native to set the content type to one of the 'Content-Type' header accepted by the API. I get the following error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error in call to API function "files/upload": Bad HTTP "Content-Type" header: "application/octet-stream; charset=utf-8". &amp;nbsp;Expecting one of "application/octet-stream", "text/plain; charset=dropbox-cors-hack&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any workaround ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not alone with this problem:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/square/okhttp/issues/3081" target="_blank"&gt;https://github.com/square/okhttp/issues/3081&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/square/okhttp/blob/master/okhttp/src/main/java/okhttp3/RequestBody.java#L53" target="_blank"&gt;https://github.com/square/okhttp/blob/master/okhttp/src/main/java/okhttp3/RequestBody.java#L53&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/facebook/react-native/issues/14445" target="_blank"&gt;https://github.com/facebook/react-native/issues/14445&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:21:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/The-Dropbox-API-V2-not-compatible-with-React-Native/m-p/226203#M12335</guid>
      <dc:creator>matt-42</dc:creator>
      <dc:date>2019-05-29T09:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: The Dropbox API V2 not incompatible with React Native</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/The-Dropbox-API-V2-not-compatible-with-React-Native/m-p/226210#M12338</link>
      <description>Thanks for the post. I don't have a workaround to offer on our side unfortunately, but I'm raising this with the engineering team to see if they can change that behavior. I can't make any promises though.</description>
      <pubDate>Fri, 16 Jun 2017 20:41:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/The-Dropbox-API-V2-not-compatible-with-React-Native/m-p/226210#M12338</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-06-16T20:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: The Dropbox API V2 not incompatible with React Native</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/The-Dropbox-API-V2-not-compatible-with-React-Native/m-p/250323#M14407</link>
      <description>Hello, have the engineering team had the opportunity to look into this bug? This is unfortunately still an issue with React Native and it means it's not possible to create apps that support Dropbox (see the GitHub issue there - &lt;A href="https://github.com/facebook/react-native/issues/14445" target="_blank"&gt;https://github.com/facebook/react-native/issues/14445&lt;/A&gt; ) Any chance it is going to be fixed on the Dropbox side?</description>
      <pubDate>Mon, 30 Oct 2017 23:53:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/The-Dropbox-API-V2-not-compatible-with-React-Native/m-p/250323#M14407</guid>
      <dc:creator>Laurent22</dc:creator>
      <dc:date>2017-10-30T23:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: The Dropbox API V2 not incompatible with React Native</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/The-Dropbox-API-V2-not-compatible-with-React-Native/m-p/250399#M14411</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/475408"&gt;@Laurent22&lt;/a&gt;&amp;nbsp;Unfortunately I don't have any news on this from the team.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 15:18:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/The-Dropbox-API-V2-not-compatible-with-React-Native/m-p/250399#M14411</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-10-31T15:18:42Z</dc:date>
    </item>
    <item>
      <title>Betreff: The Dropbox API V2 not compatible with React Native</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/The-Dropbox-API-V2-not-compatible-with-React-Native/m-p/256784#M14893</link>
      <description>&lt;P&gt;I have the same issue and after some hours fiddling around I was able to &lt;STRIKE&gt;fix&lt;/STRIKE&gt; workaround it.&amp;nbsp;I'm uploading a JSON file to a dropbox account and i used a TextEncoder like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var myFile_Encoded = new encoding.TextEncoder().encode(JSON.stringify(myFile));
dbx.filesUpload({
  path: DBX_FILEPATH,
  contents: myFile_Encoded,
  mode: 'overwrite',
});&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;This seemed to do the trick and it even worked with multibyte characters that require UTF-8. e.g. ä, ö, ü.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Do&lt;SPAN&gt;n't know whether that helps you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;regards, Tobias&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Dec 2017 13:51:37 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/The-Dropbox-API-V2-not-compatible-with-React-Native/m-p/256784#M14893</guid>
      <dc:creator>tsoltermann</dc:creator>
      <dc:date>2017-12-15T13:51:37Z</dc:date>
    </item>
  </channel>
</rss>

