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

Unable to create a publicly shareable link in the latest version of the SDK #434

Open
pradeepb28 opened this issue Sep 27, 2024 · 1 comment

Comments

@pradeepb28
Copy link

pradeepb28 commented Sep 27, 2024

Error: (SwiftyDropbox.CallError<SwiftyDropbox.Sharing.CreateSharedLinkWithSettingsError> error 4.)

I've uploaded a file and immediately checked if the file is uploaded or not using

let path = "/test.txt"

client.files.getMetadata(path: path).response(completionHandler: { response, error in
 // It actually responded the file exists

then I called the 

client.sharing.createSharedLinkWithSettings(path: path) { response, error in 
 // it throws error SwiftyDropbox.CallError<SwiftyDropbox.Sharing.CreateSharedLinkWithSettingsError> error 4
}

}

I've tried different ways of path expression in createSharedLinkWithSettings
/Apps/MyApp/test.txt
/MyApp/test.txt
/test.txt

@greg-db
Copy link
Contributor

greg-db commented Sep 27, 2024

You shouldn't change the format of the path for the two different calls; you should use the same value.

There are some errors that can occur for createSharedLinkWithSettings that wouldn't occur for getMetadata though, but the output you shared doesn't look like the format of the error output we'd expect. There should be a more detailed error message. Is that all of the output you're getting? Can you clarify how you're accessing that error information? Can you try printing that error object, if you aren't already?

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

2 participants