如何使用iOS中的Dropbox API覆盖使用父版本的文件? [英] How to overwrite file with parent rev using Dropbox API in iOS?
问题描述
我正在使用Dropbox API开发iOS应用程序。使用Dropbox API上传文件时,我只想覆盖具有相同名称的现有文件。如何设置父rev和什么值?
谢谢!
I am developing an iOS application using Dropbox API. While uploading a file using the dropbox API, I just want to overwrite the existing file with the same name. How can I set the parent rev and what value? Thanks!
推荐答案
使用 [[self restclient]获取目录中的所有文件委托中的loadMetadata:@/]
- (void)restClient:(DBRestClient *)client loadedMetadata :(DBMetadata *)元数据
您将获得每个文件的所有详细信息。
扫描您感兴趣的文件名的所有文件,并使用file.rev获取转发详细信息并存储。
in the delegate - (void)restClient:(DBRestClient *)client loadedMetadata:(DBMetadata *)metadata
you get all the details of each file.
Scan through all the files with file name of your interest and get the rev details with file.rev and store it.
当您要替换文件时,对于 parentrev
参数,将 nsstring
作为file.rev存储的内容
When you want to replace the file, for parentrev
argument, give the nsstring
as what you stored with file.rev
这篇关于如何使用iOS中的Dropbox API覆盖使用父版本的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!