<?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: Error in call to API function &amp;quot;files/upload&amp;quot;: Bad HTTP &amp;quot;Content-Type&amp;quot; in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/408793#M1109</link>
    <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1285155"&gt;@Ronaldo77&lt;/a&gt;&amp;nbsp;That line of code would disable verification of the SSL/TLS certificate, which should not be relevant to the original discussion here. In any case, we do not&amp;nbsp;recommend disabling the SSL/TLS certificate verification, as a matter of security.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Apr 2020 15:06:53 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2020-04-10T15:06:53Z</dc:date>
    <item>
      <title>Error in call to API function "files/upload": Bad HTTP "Content-Type"</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/338915#M550</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are trying the upload a file from ZOHO deluge to dropbox upload API and getting the following error.&lt;/P&gt;&lt;DIV class="pp-content"&gt;&lt;DIV class="mT15"&gt;&lt;DIV class=" delugeEditorArea"&gt;&lt;DIV class="dre-editor-layer"&gt;&lt;DIV&gt;&lt;DIV class="deluge-output"&gt;&lt;DIV class="deluge-do-content"&gt;&lt;DIV class="deluge-output-content"&gt;&lt;DIV class="deluge-doc-row"&gt;&lt;DIV class="deluge-do-result"&gt;Error in call to API function "files/upload": Bad HTTP "Content-Type" header: "application/octet-stream; boundary=e4_HWM6hUnWSMO0XyNdrs9osravFMTxunGA". Expecting one of "application/octet-stream", "text/plain; charset=dropbox-cors-hack".&lt;/DIV&gt;&lt;DIV class="deluge-do-result"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="deluge-do-result"&gt;How do I fix it?&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 May 2019 09:04:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/338915#M550</guid>
      <dc:creator>vijaysingh109</dc:creator>
      <dc:date>2019-05-29T09:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error in call to API function "files/upload": Bad HTTP "Content-Type"</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/338972#M552</link>
      <description>&lt;P&gt;The&amp;nbsp;Dropbox API /2/&lt;SPAN&gt;files/upload endpoint expects the HTTP request's "Content-Type" header to be&amp;nbsp; "application/octet-stream" or "text/plain; charset=dropbox-cors-hack". This error is indicating that your app is instead supplying&amp;nbsp;"application/octet-stream; boundary=e4_HWM6hUnWSMO0XyNdrs9osravFMTxunGA".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;That extra "boundary" portion is typically used with "multipart" requests, which the&amp;nbsp;Dropbox API doesn't expect or support.&amp;nbsp;You'll need to configure your HTTPS client to not send this kind of request. Your HTTPS client isn't made by&amp;nbsp;Dropbox though, so I can't offer much help with that. You may want to refer to the documentation for your network client for information on how to configure this.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 14:12:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/338972#M552</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-04-12T14:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error in call to API function "files/upload": Bad HTTP "Content-Type"</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/339008#M553</link>
      <description>&lt;P&gt;Hi Greg.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply, We are not setting any additional&amp;nbsp;header except "&lt;SPAN&gt;application/octet-stream".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Here is what we are setting the headers:&lt;/P&gt;&lt;P&gt;mapOfHedder.put("Content-Type","application/octet-stream");&lt;/P&gt;&lt;P&gt;Is there any other thing which you can think of the reason for the specific error?&lt;/P&gt;&lt;P&gt;Unable to attach snapshot from select file else I could have done it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 17:20:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/339008#M553</guid>
      <dc:creator>vijaysingh109</dc:creator>
      <dc:date>2019-04-12T17:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error in call to API function "files/upload": Bad HTTP "Content-Type"</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/339021#M554</link>
      <description>&lt;P&gt;I see that you are setting a correct value in your code, but it looks like your network client is overriding that setting for some reason. We have seen that sometimes, e.g., where the network client later interprets something else, for instance the way the request body itself is being set, and then overwrites the Content-Type value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll need to investigate why your network client is overriding your value, and how to prevent that. That will be specific to your client though, so I can't provide specific instructons unfortunately.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 18:24:23 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/339021#M554</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-04-12T18:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Error in call to API function "files/upload": Bad HTTP "Content-Type"</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/408683#M1108</link>
      <description>&lt;P&gt;curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 08:36:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/408683#M1108</guid>
      <dc:creator>Ronaldo77</dc:creator>
      <dc:date>2020-04-10T08:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error in call to API function "files/upload": Bad HTTP "Content-Type"</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/408793#M1109</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1285155"&gt;@Ronaldo77&lt;/a&gt;&amp;nbsp;That line of code would disable verification of the SSL/TLS certificate, which should not be relevant to the original discussion here. In any case, we do not&amp;nbsp;recommend disabling the SSL/TLS certificate verification, as a matter of security.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 15:06:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/408793#M1109</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-04-10T15:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error in call to API function "files/upload": Bad HTTP "Content-Type"</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/411557#M1141</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem here is the multipart thing, which is triggered in PHP/CURL when you set CURLOPT_POSTFIELD to an array. You need to send the file in the "old" way, which means setting the CURLOPT_POSTFIELD to a special string with the "@" prefix followed by the full (real) path to the file you want to send.&lt;/P&gt;&lt;P&gt;Unfortunately, it doesn't seem to work anymore, since it's deprecated in favor of the "new" way (as of PHP 7) which is to use the CURFile class (or the curl_file_create() function)...which ends up with an array and you're back to square one &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@EA4D5AD6084EAC95CB4E739348E74CC6/emoticons/1f615.png" alt=":confused_face:" title=":confused_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The workaround is to not use CURL, but instead file_get_contents() along with a stream_context.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2020 16:54:24 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Error-in-call-to-API-function-quot-files-upload-quot-Bad-HTTP/m-p/411557#M1141</guid>
      <dc:creator>Nilpohc</dc:creator>
      <dc:date>2020-04-18T16:54:24Z</dc:date>
    </item>
  </channel>
</rss>

