<?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: Can not upload large  file by chunks in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-not-upload-large-file-by-chunks/m-p/188716#M8028</link>
    <description>&lt;P&gt;Hi Gregory,&lt;/P&gt;
&lt;P&gt;I too am unable to upload a file in chunks. As far as I remember this used to work earlier for sure. I am using v2 API. The error occurs at the /finish stage. The exact error is:&lt;/P&gt;
&lt;P&gt;Error transferring &lt;A href="https://content.dropboxapi.com/2/files/upload_session/finish" rel="nofollow noreferrer"&gt;https://content.dropboxapi.com/2/files/upload_session/finish&lt;/A&gt; - server replied: Bad Request&lt;/P&gt;
&lt;P&gt;With HTTP status Code: 400&lt;/P&gt;
&lt;P&gt;&amp;nbsp;The /start and /append_v2 sessions works and return Status Code: 200.&lt;/P&gt;
&lt;P&gt;P.S: I'm using REST API v2.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Sep 2016 12:48:55 GMT</pubDate>
    <dc:creator>uosuser u.</dc:creator>
    <dc:date>2016-09-09T12:48:55Z</dc:date>
    <item>
      <title>Can not upload large  file by chunks</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-not-upload-large-file-by-chunks/m-p/188714#M8026</link>
      <description>&lt;P&gt;I am trying to upload file by chunks. Here is my code&amp;nbsp;&lt;/P&gt;
&lt;P&gt;self.client.files.uploadSessionStart(input: chunkOfData).response { response, error in&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if let result = response {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // the call succeeded&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(result)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(end &amp;lt; fileSize) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end += self.CHUNK_SIZE;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var chunkOfData = data.subdataWithRange(NSRange(location: end, length: self.CHUNK_SIZE)) // get range of bytes from file&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.client.files.uploadSessionAppendV2(cursor: Files.UploadSessionCursor(sessionId: result.sessionId, offset: end), input: chunkOfData)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // we're ready to finish the upload and commit the file&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.client.files.uploadSessionFinish(cursor: Files.UploadSessionCursor(sessionId: result.sessionId, offset: end),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; commit: Files.CommitInfo(path: self.filePath),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // no additional data to add at this point in this case&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; body:NSData()).response { response, error in&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if let result = response {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(result)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(error!)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // the call failed&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(error!)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P&gt;Please help what am I doing wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:30:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-not-upload-large-file-by-chunks/m-p/188714#M8026</guid>
      <dc:creator>Nerses G.</dc:creator>
      <dc:date>2019-05-29T09:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can not upload large  file by chunks</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-not-upload-large-file-by-chunks/m-p/188715#M8027</link>
      <description>&lt;P&gt;What specifically isn't working as expected? Are you getting an error?&lt;/P&gt;
&lt;P&gt;There's a sample here that may be helpful:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/documentation/dropbox-api/409/uploading-a-file/1357/uploading-a-file-with-every-error-case-handled-using-the-swiftydropbox-library#t=201609081416309785993" rel="nofollow noreferrer"&gt;https://stackoverflow.com/documentation/dropbox-api/409/uploading-a-file/1357/uploading-a-file-with-every-error-case-handled-using-the-swiftydropbox-library#t=201609081416309785993&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 23:31:37 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-not-upload-large-file-by-chunks/m-p/188715#M8027</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-09-08T23:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can not upload large  file by chunks</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-not-upload-large-file-by-chunks/m-p/188716#M8028</link>
      <description>&lt;P&gt;Hi Gregory,&lt;/P&gt;
&lt;P&gt;I too am unable to upload a file in chunks. As far as I remember this used to work earlier for sure. I am using v2 API. The error occurs at the /finish stage. The exact error is:&lt;/P&gt;
&lt;P&gt;Error transferring &lt;A href="https://content.dropboxapi.com/2/files/upload_session/finish" rel="nofollow noreferrer"&gt;https://content.dropboxapi.com/2/files/upload_session/finish&lt;/A&gt; - server replied: Bad Request&lt;/P&gt;
&lt;P&gt;With HTTP status Code: 400&lt;/P&gt;
&lt;P&gt;&amp;nbsp;The /start and /append_v2 sessions works and return Status Code: 200.&lt;/P&gt;
&lt;P&gt;P.S: I'm using REST API v2.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 12:48:55 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-not-upload-large-file-by-chunks/m-p/188716#M8028</guid>
      <dc:creator>uosuser u.</dc:creator>
      <dc:date>2016-09-09T12:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can not upload large  file by chunks</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-not-upload-large-file-by-chunks/m-p/188717#M8029</link>
      <description>&lt;P&gt;uosuser, please create a new thread to get help with your issue, and please share the body of the&amp;nbsp;400 response. (The body should be JSON that describes the&amp;nbsp;error.)&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 21:29:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-not-upload-large-file-by-chunks/m-p/188717#M8029</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2016-09-09T21:29:14Z</dc:date>
    </item>
  </channel>
</rss>

