你不能像以前那样做。在
path
归档您需要添加要添加文件的路径。然后你需要传递内容。改为这样做:
let client = DropboxClientsManager.authorizedClient
let fileData = "Some test text to upload".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(response)
} else if let error = error {
print(error)
}
}
.progress { progressData in
print(progressData)
}