You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
wwaag76
7 years agoHelpful | Level 6
Path Not Found Error
New user here just working through the tutorial https://www.dropbox.com/developers/documentation/dotnet#tutorial When I generate a token using an app for Full Dropbox, it works OK. However, if I generate a token using an app for an App Folder only, I get an error that the path could not be found when calling download.
Here is my test code. I've tried replacing "/HappyOtterInstaller" with "", but I get the same error. Could you point me in the right direction. Thanks.
wayne
using (var dbx = new DropboxClient("blahblah")) { var full = await dbx.Users.GetCurrentAccountAsync(); Console.WriteLine("{0} - {1}", full.Name.DisplayName, full.Email); Console.WriteLine("Press enter to close..."); Console.ReadLine(); await ListRootFolder(dbx); Console.WriteLine("Press enter to close..."); Console.ReadLine(); await Download(dbx, "/HappyOtterInstaller", "currentBuild.txt"); Console.WriteLine("Download__Press enter to close..."); Console.ReadLine(); await Upload(dbx, "/HappyOtterInstaller", "currentBuild.txt", @"F:\ww.txt"); Console.WriteLine("Press enter to close..."); Console.ReadLine(); }
Problem solved. Didn't understand that the App folder was created under the main folder Apps. Now working OK. Thanks.
- chirstiusDropbox Staff
Hey wwaag76,
Would you mind showing the actual code within your methods that are failing? I assume things are erroring out at the call to ListRootFolder()?
Can you show the contents of that method?
Typically errors that occur with pathing between full access and App Folder access are not honoring the fact that App Folder apps are effectively chroot'd to their App Folder - so as an example: /Apps/HappyOtterInstaller IS your root, all paths you want to reference are relative to that path as root. So the folder: /Apps/HappyOtterInstaller/install.exe is referred to as just /install.exe by your app. But since you say you tried passing an empty string for path (which always translates to root) I would think just listing files would work.
Seeing the code might help figure out if there's another issue at play.Thanks,
-Chuck
- wwaag76Helpful | Level 6
I assume things are erroring out at the call to ListRootFolder()?
No, it gets past that call. It's the Download call that produces the error. Here's the code for the Download method.
async Task Download(DropboxClient dbx, string folder, string file) { using (var response = await dbx.Files.DownloadAsync(folder + "/" + file)) //using (var response = await dbx.Files.DownloadAsync(file)) { Console.WriteLine(await response.GetContentAsStringAsync()); } }
- wwaag76Helpful | Level 6
One other thing. Inside the app looks like this.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf 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 or Facebook.
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!