<?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 PHP cURL chunked upload in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/PHP-cURL-chunked-upload/m-p/539857#M25901</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have built a PHP to automate backups to dropbox amongst other things.&lt;/P&gt;
&lt;P&gt;everything works well with the exception of chunked upload.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;No Errors are returned from dropbox at any point in the transaction&lt;/LI&gt;
&lt;LI&gt;I am using split to chunk the file into 50mb chunks&lt;/LI&gt;
&lt;LI&gt;run a foreach loop to upload the chunks via&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;"Dropbox-API-Arg: {\"cursor\": {\"session_id\": \"$session_id\",\"offset\": $offset},\"close\": false}";​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where $session_id is the session id &amp;amp; $offset = the amount of the file uploaded in bytes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;then finish up with&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;"Dropbox-API-Arg: {\"cursor\": {\"session_id\": \"$session_id\",\"offset\": $offset},\"commit\": {\"path\": \"$upload_path\",\"mode\": \"overwrite\",\"autorename\": true,\"mute\": false}}";​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$offset = total file size&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;All endpoints are correct.&lt;/LI&gt;
&lt;LI&gt;The problem is the file is uploaded to Dropbox with no errors, Dropbox reports the file size correctly, so far so good, then if this file is a tar and you download it &amp;amp; try and view the archive, it opens fine but only contains the directory listing and no files&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;if I reconnect all the chunks back together the archive reads fine so I can discount an error from the split utility&lt;BR /&gt;any ideas ?&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Wed, 18 Aug 2021 12:13:37 GMT</pubDate>
    <dc:creator>JimTR</dc:creator>
    <dc:date>2021-08-18T12:13:37Z</dc:date>
    <item>
      <title>PHP cURL chunked upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/PHP-cURL-chunked-upload/m-p/539857#M25901</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have built a PHP to automate backups to dropbox amongst other things.&lt;/P&gt;
&lt;P&gt;everything works well with the exception of chunked upload.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;No Errors are returned from dropbox at any point in the transaction&lt;/LI&gt;
&lt;LI&gt;I am using split to chunk the file into 50mb chunks&lt;/LI&gt;
&lt;LI&gt;run a foreach loop to upload the chunks via&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;"Dropbox-API-Arg: {\"cursor\": {\"session_id\": \"$session_id\",\"offset\": $offset},\"close\": false}";​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where $session_id is the session id &amp;amp; $offset = the amount of the file uploaded in bytes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;then finish up with&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;"Dropbox-API-Arg: {\"cursor\": {\"session_id\": \"$session_id\",\"offset\": $offset},\"commit\": {\"path\": \"$upload_path\",\"mode\": \"overwrite\",\"autorename\": true,\"mute\": false}}";​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$offset = total file size&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;All endpoints are correct.&lt;/LI&gt;
&lt;LI&gt;The problem is the file is uploaded to Dropbox with no errors, Dropbox reports the file size correctly, so far so good, then if this file is a tar and you download it &amp;amp; try and view the archive, it opens fine but only contains the directory listing and no files&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;if I reconnect all the chunks back together the archive reads fine so I can discount an error from the split utility&lt;BR /&gt;any ideas ?&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 18 Aug 2021 12:13:37 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/PHP-cURL-chunked-upload/m-p/539857#M25901</guid>
      <dc:creator>JimTR</dc:creator>
      <dc:date>2021-08-18T12:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: PHP cURL chunked upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/PHP-cURL-chunked-upload/m-p/539909#M25904</link>
      <description>&lt;P&gt;I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;- the name and version number of the platform and SDK/library you are using, if any&lt;BR /&gt;- the steps to reproduce the issue, including relevant code snippet(s), but don't include any access token(s)&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 14:59:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/PHP-cURL-chunked-upload/m-p/539909#M25904</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-08-18T14:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: PHP cURL chunked upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/PHP-cURL-chunked-upload/m-p/544369#M26013</link>
      <description>&lt;P&gt;I am writing an app from scratch in php, but I found the issue,for anyone else the answer was to use fopen rather than gzopen&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Sep 2021 10:26:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/PHP-cURL-chunked-upload/m-p/544369#M26013</guid>
      <dc:creator>JimTR</dc:creator>
      <dc:date>2021-09-12T10:26:21Z</dc:date>
    </item>
  </channel>
</rss>

