@IBAction func saveFile(_ sender: Any) {
let client = DropboxClientsManager.authorizedClient
let fileData = "testing data example".data(using: String.Encoding.utf8, allowLossyConversion: false)!
let request = client?.files.upload(path: "/test/path/in/Dropbox/account", input: fileData).response { response, error in
if let response = response {
print("The upload response is \(response)")
} else if let error = error {
print("The upload error is \(error)")
}
}
.progress { progressData in
print(progressData)
}
// in case you want to cancel the request
// if someConditionIsSatisfied {
// request.cancel()
print(" View Loaded ")
}
这里我试图将文件上传到Dropbox,但文件没有出现在Dropbox中。任何人都可以解释为什么会这样吗?