cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Objective C batchUploadFiles gives error: "missing required field 'session_id'" or "Garbage at end."

Objective C batchUploadFiles gives error: "missing required field 'session_id'" or "Garbage at end."

DboxDeveloper
Explorer | Level 3
Go to solution

Hi,

 

I am getting the error 

 

 

DropboxBadInputError[{
ErrorContent = "Error in call to API function \"files/upload_session/finish_batch\": request body: entries.cursor: missing required field 'session_id'";
RequestId = 0af1f37eb6e9ebc3e7ea0695db52c593;
StatusCode = 400;
UserMessage = nil;
}];

 

 

 

And

 

 

"DropboxClientError[{\n    NSError = \"Error Domain=NSCocoaErrorDomain Code=3840 \\\"Garbage at end.\\\" UserInfo={NSDebugDescription=Garbage at end.}\";

 

Search for the 

 

 

[[DBClientsManager authorizedClient].filesRoutes
                                batchUploadFiles:uploadFilesUrlsToCommitInfo
                                queue:nil

 

inside the code. 

 

I posted the entire method because I was worried that some part of the method maybe affecting the the batch upload. 

 

The begin upload method works like this 

 

1) it finds the photos that are present in the dropbox,

2) it compares it with photos present in the app,

3) then it deletes photos and other files that are in dropbox that are not present in the app or need to be deleted

4) Finally through batchupload it uploads all the photos that are not present into dropbox.

 

I really need help to fix this , been searching through the internet and trying different approaches but can't find an answer. Hopping someone can help

 

 Update:(easier to implement code for anyone who wants to help)

Here is the entire code

https://github.com/git-tyl/WineCellarProblemCode/blob/master/problemUploadingDropboxCode.m

 

10 Replies 10

Greg-DB
Dropbox Staff
Go to solution

@rharter Thanks for the report! Your code does look simpler/correct, so I don't think I have a workaround to offer in this case. We'll look into it.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    rharter New member | Level 2
  • User avatar
    DboxDeveloper Explorer | Level 3
What do Dropbox user levels mean?