在块上传结束时,我使用以下命令提交文件:
self.restClient.uploadFile(filename, toPath: destDir, withParentRev: nil, fromUploadId: uploadId)
这次提交会失败吗?是否存在此方法返回时运行的成功或错误方法?
答案 0 :(得分:1)
€dited:您可以使用几种委托方法
func restClient(client: DBRestClient!, loadedFile destPath: String!, contentType: String!, metadata: DBMetadata!) {
NSLog("File DOWNLOADED successfully to path: %@", destPath);
}
func restClient(client: DBRestClient!, loadFileFailedWithError error: NSError!) {
NSLog("File DOWNLOAD failed with error: %@", error)
}
func restClient(client: DBRestClient!, uploadFileFailedWithError error: NSError!) {
NSLog("File UPLOAD failed with error: %@", error)
}