<?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: Cannot commit chunk upload. Returns 400 always. in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-commit-chunk-upload-Returns-400-always/m-p/136250#M4203</link>
    <description>&lt;P&gt;What's the body of the 400&amp;nbsp;response?&lt;/P&gt;</description>
    <pubDate>Tue, 15 Sep 2015 22:22:20 GMT</pubDate>
    <dc:creator>Steve M.</dc:creator>
    <dc:date>2015-09-15T22:22:20Z</dc:date>
    <item>
      <title>Cannot commit chunk upload. Returns 400 always.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-commit-chunk-upload-Returns-400-always/m-p/136249#M4202</link>
      <description>&lt;P&gt;Whenever I commit the chunk upload supplying the access_token and upload_id, it always return an error code 400.&lt;/P&gt;
&lt;P&gt;Here is the code.&lt;/P&gt;
&lt;P&gt;private boolean commitChunk(String upload_id, String path){&lt;BR /&gt; int responseCode = 0;&lt;BR /&gt; try {&lt;BR /&gt; URL url = new URL("&lt;A href="https://content.dropboxapi.com/1/commit_chunked_upload/auto/" rel="nofollow noreferrer" target="_blank"&gt;https://content.dropboxapi.com/1/commit_chunked_upload/auto/&lt;/A&gt;" + path);&lt;BR /&gt; HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();&lt;BR /&gt; connection.setRequestProperty("Connection", "Keep-Alive");&lt;BR /&gt; connection.setRequestProperty("Authorization", "Bearer " + access_token_here);&lt;BR /&gt; connection.setRequestMethod("POST");&lt;BR /&gt; connection.setUseCaches(false);&lt;BR /&gt; connection.setDoInput(true);&lt;BR /&gt; connection.setDoOutput(true);&lt;BR /&gt; DataOutputStream wr = new DataOutputStream(connection.getOutputStream());&lt;BR /&gt; wr.writeBytes("upload_id=" + upload_id);&lt;BR /&gt; wr.flush();&lt;BR /&gt; wr.close();&lt;BR /&gt; responseCode = connection.getResponseCode();&lt;BR /&gt; System.out.println("response code: " + responseCode);&lt;BR /&gt; if(responseCode == 200){&lt;BR /&gt; connection.disconnect();&lt;BR /&gt; return true;&lt;BR /&gt; }&lt;BR /&gt; } catch (Exception exception) {&lt;BR /&gt; LogService.info(exception.getMessage());&lt;BR /&gt; System.out.println("Exception: " + exception.getMessage());&lt;BR /&gt; } &lt;BR /&gt; return false;&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: I cannot use Dropbox SDK, and limited to Java1.4 only. So I can only do manual HTTP methods.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:39:58 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-commit-chunk-upload-Returns-400-always/m-p/136249#M4202</guid>
      <dc:creator>Wilson Jan S.</dc:creator>
      <dc:date>2019-05-29T09:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot commit chunk upload. Returns 400 always.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-commit-chunk-upload-Returns-400-always/m-p/136250#M4203</link>
      <description>&lt;P&gt;What's the body of the 400&amp;nbsp;response?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2015 22:22:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-commit-chunk-upload-Returns-400-always/m-p/136250#M4203</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-09-15T22:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot commit chunk upload. Returns 400 always.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-commit-chunk-upload-Returns-400-always/m-p/136251#M4204</link>
      <description>&lt;P&gt;Sorry, I already found the problem. I didn't specify a filename. My bad. Sorry. The response body was Bad Request. Thanks for the support Mr. Steve. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 06:12:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-commit-chunk-upload-Returns-400-always/m-p/136251#M4204</guid>
      <dc:creator>Wilson Jan S.</dc:creator>
      <dc:date>2015-09-18T06:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot commit chunk upload. Returns 400 always.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-commit-chunk-upload-Returns-400-always/m-p/136252#M4205</link>
      <description>&lt;P&gt;Just for&amp;nbsp;future debugging, "Bad Request" is the status line. The actual body of the response should contain an error message that probably said something about a missing parameter. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 06:14:26 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-commit-chunk-upload-Returns-400-always/m-p/136252#M4205</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-09-18T06:14:26Z</dc:date>
    </item>
  </channel>
</rss>

