Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
gagsbh
2 years agoHelpful | Level 5
File Download API Exception
Hello Greg-DB Recently, there were changes made in the code related to Dropbox Teamspaces. We are now facing errors sometimes when we download files that were notified with file paths by webhoo...
- 2 years ago
Thanks for following up. To be clear, you should not be adding "/root" to the path itself, as that's not a path component (unless some user/app literally made a folder named "root"). You can use PathRoot.Root with a root namespace ID just like you used PathRoot.NamespaceId.
That is, modifying your original code, that would look like:
clientadmin = clientadmin.WithPathRoot(new PathRoot.Root(rootnamespace));
Greg-DB
Dropbox Community Moderator
2 years agoI see you're attempting to access the user's root namespace, in which case it's generally best to use the PathRoot.Root mode instead of PathRoot.NamespaceId. Please give that a try and let me know what you get.
gagsbh
2 years agoHelpful | Level 5
Thank you for your reply.
How do I use PathRoot.Root mode in my c# code.
I changed the path parameter in my existing code from /Boolean Array/12/SOBR10.png, it gives error 'Path not found'.
to /root/Boolean Array/12/SOBR10.png
Then I tried changing the code:
using (var response = await dbx.Files.DownloadAsync(new Dropbox.Api.Files.DownloadArg(dropboxFilePath, pathRoot: new Dropbox.Api.PathRoot { Tag = Dropbox.Api.PathRoot.Tag.Root })))
Visual Studio gave compilation error:
The type or namespace name 'PathRoot' does not exist in the namespace 'Dropbox.Api' (are you missing an assembly reference?)
The best overload for 'DownloadArg' does not have a parameter named 'pathRoot'
Please suggest.
Thanks,
Gagan
- Greg-DB2 years ago
Dropbox Community Moderator
Thanks for following up. To be clear, you should not be adding "/root" to the path itself, as that's not a path component (unless some user/app literally made a folder named "root"). You can use PathRoot.Root with a root namespace ID just like you used PathRoot.NamespaceId.
That is, modifying your original code, that would look like:
clientadmin = clientadmin.WithPathRoot(new PathRoot.Root(rootnamespace));
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!