<?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: mulitple files upload doesnt work in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/mulitple-files-upload-doesnt-work/m-p/209397#M10383</link>
    <description>The UploadSessionFinishArg object is just an argument that you constructed. That is, it only is a way for you to specify parameter, but doesn't itself make the API call.&lt;BR /&gt;&lt;BR /&gt;The actual API calls are to finish and check these are uploadSessionFinishBatch and uploadSessionFinishBatchCheck. What are those returning for you?</description>
    <pubDate>Thu, 02 Mar 2017 18:39:23 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2017-03-02T18:39:23Z</dc:date>
    <item>
      <title>mulitple files upload doesnt work</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/mulitple-files-upload-doesnt-work/m-p/209113#M10349</link>
      <description>&lt;P&gt;I am using the java sdk to upload files on dropbox. Since i want to upload a bunch of them, i tried the chunck upload method. This is what i got.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;   public MultipleUpload addFile(File file,String path) throws DbxApiException, DbxException, IOException {         
            in = new FileInputStream(file);
            sessionId = client.files().uploadSessionStart(false).uploadAndFinish(in).getSessionId();
            
            offset = file.length();
            cursor = new UploadSessionCursor(sessionId, offset);
            int index =file.getAbsolutePath().indexOf(path);
            commitInfo = new CommitInfo(path, WriteMode.OVERWRITE, false, new Date(), false);
        
            UploadSessionFinishArg arg = new UploadSessionFinishArg(cursor, commitInfo);
             
            entries.add(arg);
            return this;
        }
     
        public void commit() throws DbxException, InterruptedException {
           int count=0;
           LaunchEmptyResult result = client.files().uploadSessionFinishBatch(entries);
           while (count&amp;lt;10){
                    
            try { if(!client.files().uploadSessionFinishBatchCheck(result.getAsyncJobIdValue()).isInProgress()) {
                //all ok
                System.out.println("(((END"+new Date());
                return;
            }
            System.out.println("Try Again");
            Thread.sleep(5000);                
                        
        } catch (DbxException  e){
            e.printStackTrace();
         } catch (InterruptedException e) {
            e.printStackTrace();
         }
      }   
   }
    &lt;/PRE&gt;&lt;P&gt;and in order to use it i call&lt;/P&gt;&lt;PRE&gt;addFile(new File("localfile.xxx"), "/testing/builderTest/bw.tmp")
.addFile(new File("localfile.xxx"), "/testing/builderTest/aw.tmp")
.commit();&lt;/PRE&gt;&lt;P&gt;But this is not uploading anything, and it doesnt return any error either.&lt;/P&gt;&lt;P&gt;any help is highly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:25:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/mulitple-files-upload-doesnt-work/m-p/209113#M10349</guid>
      <dc:creator>skaros</dc:creator>
      <dc:date>2019-05-29T09:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: mulitple files upload doesnt work</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/mulitple-files-upload-doesnt-work/m-p/209214#M10362</link>
      <description>You should certainly be getting some error or output. Have you stepped through it with a debugger to see what it's doing and what code path it's taking?</description>
      <pubDate>Wed, 01 Mar 2017 21:44:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/mulitple-files-upload-doesnt-work/m-p/209214#M10362</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-03-01T21:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: mulitple files upload doesnt work</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/mulitple-files-upload-doesnt-work/m-p/209252#M10371</link>
      <description>&lt;P&gt;I am not getting any error at all. Everything seems to be working as it should.&lt;/P&gt;&lt;P&gt;I&amp;nbsp; print out the&lt;/P&gt;&lt;P&gt;UploadSessionFinishArg.toStringMultiline() and got this&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;&amp;nbsp; "cursor" : {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "session_id" : "AAAAAAADdQAca70DFR87FA",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "offset" : 160622&lt;BR /&gt;&amp;nbsp; },&lt;BR /&gt;&amp;nbsp; "commit" : {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "path" : "/khmdhsData/testing/builderTest/aw.tmp",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "mode" : "overwrite",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "autorename" : false,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "client_modified" : "2017-03-02T08:15:39Z",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "mute" : false&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So it seems to be working. But nothing is uploaded! How can i check the state of the uploading. have no idea how to debug this&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 08:22:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/mulitple-files-upload-doesnt-work/m-p/209252#M10371</guid>
      <dc:creator>skaros</dc:creator>
      <dc:date>2017-03-02T08:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: mulitple files upload doesnt work</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/mulitple-files-upload-doesnt-work/m-p/209397#M10383</link>
      <description>The UploadSessionFinishArg object is just an argument that you constructed. That is, it only is a way for you to specify parameter, but doesn't itself make the API call.&lt;BR /&gt;&lt;BR /&gt;The actual API calls are to finish and check these are uploadSessionFinishBatch and uploadSessionFinishBatchCheck. What are those returning for you?</description>
      <pubDate>Thu, 02 Mar 2017 18:39:23 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/mulitple-files-upload-doesnt-work/m-p/209397#M10383</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-03-02T18:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: mulitple files upload doesnt work</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/mulitple-files-upload-doesnt-work/m-p/210810#M10556</link>
      <description>&lt;P&gt;It seemed that the problem was on this line&lt;/P&gt;&lt;PRE&gt;sessionId = client.files().uploadSessionStart(&lt;STRONG&gt;false&lt;/STRONG&gt;).uploadAndFinish(in).getSessionId();&lt;/PRE&gt;&lt;P&gt;from the&lt;/P&gt;&lt;PRE&gt;public MultipleUpload addFile()&lt;/PRE&gt;&lt;P&gt;changed it to this&lt;/P&gt;&lt;PRE&gt;sessionId = client.files().uploadSessionStart(&lt;STRONG&gt;true&lt;/STRONG&gt;).uploadAndFinish(in).getSessionId();&lt;/PRE&gt;&lt;P&gt;and it seems to be working (so far at least)&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2017 20:04:37 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/mulitple-files-upload-doesnt-work/m-p/210810#M10556</guid>
      <dc:creator>skaros</dc:creator>
      <dc:date>2017-03-09T20:04:37Z</dc:date>
    </item>
  </channel>
</rss>

