Question

I am trying to upload a file to Dropbox and overwrite the previous file with the same name, but I can't quite understand how to use the metadata appropriately. I based my code on the Dropbox examples, so the restClients remain as shown there.

This is part of my code:

[[self restClient] loadMetadata:filename];
[self.restClient uploadFile:filename toPath:destDir withParentRev:nil fromPath:localPath];

I know the withParentRevparameter should be changed, but I do not what to change it to. Where is the metadata saved?

Was it helpful?

Solution

In your restClient:loadedMetadata: delegate method, you get the parent revision from the DBMetadata object using the rev property.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top