<?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: API - How to stop an upload? in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/API-How-to-stop-an-upload/m-p/580794#M2436</link>
    <description>&lt;P&gt;thanks Greg, that's what I was trying and I finally made it work!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;just in case someone bumps on the same issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;within the upload example there is the following:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const task = workItems.reduce((acc, blob, idx, items) =&amp;gt; {&lt;/LI-CODE&gt;&lt;P&gt;which has three instances of:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;return acc.then(function(sessionId) {&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what you need to do is add a line in the beginning of all 3 above instances&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if( fileUploadShouldBeAborted ) return&lt;/LI-CODE&gt;&lt;P&gt;obviously, fileUploadShouldBeAborted has to be populated by you somehow&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then you also need to handle the case that the upload has been completed,&lt;/P&gt;&lt;P&gt;which can only be solved by making another call to delete the file&lt;/P&gt;</description>
    <pubDate>Tue, 01 Mar 2022 15:37:28 GMT</pubDate>
    <dc:creator>manos77</dc:creator>
    <dc:date>2022-03-01T15:37:28Z</dc:date>
    <item>
      <title>API - How to stop an upload?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/API-How-to-stop-an-upload/m-p/580587#M2428</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've built an app using the JavaScript SDK where users can upload files to a folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sometimes users are uploading big files eg a few GB and they decide they want to stop uploading the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't see a method on how to do that - neither with&amp;nbsp;filesUpload nor with&amp;nbsp;filesUploadSessionStart,&amp;nbsp;filesUploadSessionAppendV2,&amp;nbsp;filesUploadSessionFinish methods.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you guide me on how to achieve that? I am particularly interested in stopping the chunked uploading&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 12:47:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/API-How-to-stop-an-upload/m-p/580587#M2428</guid>
      <dc:creator>manos77</dc:creator>
      <dc:date>2022-04-27T12:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: API - How to stop an upload?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/API-How-to-stop-an-upload/m-p/580596#M2430</link>
      <description>&lt;P&gt;The Dropbox API v2 JavaScript API v2 SDK doesn't offer the ability to cancel an individual request, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For upload sessions though, since it involves multiple calls, you can stop the process in between any of the individual filesUploadSession* method calls, since you control the execution flow of those; that is, stop making any further such calls when the user indicates they want to cancel.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 17:13:07 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/API-How-to-stop-an-upload/m-p/580596#M2430</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-02-28T17:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: API - How to stop an upload?</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/API-How-to-stop-an-upload/m-p/580794#M2436</link>
      <description>&lt;P&gt;thanks Greg, that's what I was trying and I finally made it work!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;just in case someone bumps on the same issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;within the upload example there is the following:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const task = workItems.reduce((acc, blob, idx, items) =&amp;gt; {&lt;/LI-CODE&gt;&lt;P&gt;which has three instances of:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;return acc.then(function(sessionId) {&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what you need to do is add a line in the beginning of all 3 above instances&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if( fileUploadShouldBeAborted ) return&lt;/LI-CODE&gt;&lt;P&gt;obviously, fileUploadShouldBeAborted has to be populated by you somehow&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then you also need to handle the case that the upload has been completed,&lt;/P&gt;&lt;P&gt;which can only be solved by making another call to delete the file&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 15:37:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/API-How-to-stop-an-upload/m-p/580794#M2436</guid>
      <dc:creator>manos77</dc:creator>
      <dc:date>2022-03-01T15:37:28Z</dc:date>
    </item>
  </channel>
</rss>

