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: 

Re: How to upload to root with sample code

How to upload to root with sample code

808phone
Explorer | Level 4

For the "advanced upload case for "batch" uploading a large number of files" how do you specify root?

For this line:

DBFILESCommitInfo *commitInfo = [[DBFILESCommitInfo alloc] initWithPath:@"/output/path/in/Dropbox"];

initWithPath - I have tried @"/", @"" and other combinations. They all fail with malformed path or other errors.

 

If I specify: @"/" I get this error after the upload is done:

(lldb) po resultEntry.failure

{

    ".tag" = path;

    path =     {

        ".tag" = "malformed_path";

    };

}

 

Thanks

 

6 Replies 6

808phone
Explorer | Level 4

I have found out that it is a full path - including filename. 

I wish I didn't have to guess at all of this!!!!!

Is it too much to ask for full example code of uploading chunked files?

Stephen C.14
Dropbox Staff

Sorry for the confusion here. I updated the README to make it clearer that the ouput path is the full path, including file name.

 

Let us know if you have any other questions or feedback for the SDK.

808phone
Explorer | Level 4

Thank you Stephen. Another thing is why does it wait until the end to decide that the path is not valid?

I was testing a 300MB file which took a long time. I mean it was over an hour I think. At the very end, it decided that the file path was "malformed". 

Thanks!

Stephen C.14
Dropbox Staff

Yeah it's not ideal, but this is the sort of the price of "batching" everything at once.

 

Because we don't make so many trips to where our metadata lives during upload, you can upload a lot of stuff at once without running into rate-limiting. But because you do these metadata write operations all at once as the final step, you don't know if ythere's something wrong like a malformed path until everything is already uploaded.

808phone
Explorer | Level 4

Stephen,

 

Is the upload much slower than before? I don't remember it taking so long to upload large files....

Stephen C.14
Dropbox Staff

I checked our performance graphs, and it doesn't appear that any of our upload endpoints have higher latency than normal.

 

Of course, double check your connection and make sure it's robust.

 

If this issue persists for more than a few hours and if you notice it consistently, re-ping this thread, and I can take a closer look.

Need more support?