Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
mrschulz
8 years agoExplorer | Level 3
Dropbox API - Objective C - uploadData - versioned updates
Objective-C API Question
Previously when I uploaded files (old API) dropbox would create numbered versions if the file was already there.
I am trying to do this same thing using the "upl...
Greg-DB
Dropbox Community Moderator
8 years agoWhen using the "update" write mode, the "parentRev" value should be the latest FileMetadata.rev value you saw for the file. That allows you to safely overwrite the file without accidentally overwriting a newer version. (It will create a conflict if the rev value you supply isn't actually the latest.)
Based on your description though, it sounds like you might actually want the "add" write mode. There's more information on the different write modes in that documentation.
- mrschulz8 years agoExplorer | Level 3
the "add Write" mode sounds like exactly what I need.
However, it gives me this error when I try it ( do I still need the parentRev somehow ?)
There was an error uploading the file
RouteError - {
".tag" = path;
path = {
reason = {
".tag" = conflict;
conflict = {
".tag" = file;
};
};
"upload_session_id" = AAAAAAAALlfY4TOhRrLTZw;
};
}
NetworkError - DropboxHttpError[{
ErrorContent = "path/conflict/file/.";
RequestId = f3592a2cc49f18bb997e881887eba543;
StatusCode = 409;
UserMessage = nil;
}];
- Greg-DB8 years ago
Dropbox Community Moderator
Apologies, I should have mentioned, in order to get the behavior you're looking for, you'll also need to set `autorename` in addition to using the 'add' write mode, e.g.:
When using the 'add' write mode, uploading to a path that already contains a file will create a "conflict", and the `autorename` parameter controls what happens when there's a conflict.
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!