Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
808phone
8 years agoExplorer | Level 4
How to upload to root with sample code
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
- 808phone8 years agoExplorer | 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.148 years ago
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.
- 808phone8 years agoExplorer | 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.148 years ago
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.
- 808phone8 years agoExplorer | Level 4
Stephen,
Is the upload much slower than before? I don't remember it taking so long to upload large files....
- Stephen C.148 years ago
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.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!