Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uploadItem. code = 22 #111

Open
chinamingsss opened this issue Sep 5, 2024 · 0 comments
Open

uploadItem. code = 22 #111

chinamingsss opened this issue Sep 5, 2024 · 0 comments

Comments

@chinamingsss
Copy link

My code :
var savePath = remotePath
if(savePath.hasSuffix("/")){
savePath = "(savePath)(localUrl.lastPathComponent)"
}else{
savePath = "(savePath)/(localUrl.lastPathComponent)"
}
self.client?.uploadItem(at: localUrl, toPath: savePath, progress: { bytes in
print("(bytes)")
return true
}, completionHandler: { error in
if error != nil {
print("(String(describing: error))")
} else {
print("success")
}
})

the savePath is. /testFloder/welcome_1.pdf

This folder is a folder under the share folder. I want to transfer files to this folder, but the error message is as follows:

Optional(Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedFailureReason=Error code 22: Open failed with (0xc000000d) STATUS_INVALID_PARAMETER.})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant