Domanda

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?

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top