The Community is undergoing a major upgrade. Find out more, ask us questions or share your thoughts here.

Forum Discussion

kdss-ja's avatar
kdss-ja
Explorer | Level 3
2 years ago

How to share files with App

I've created a new drop box app

and followed example to connect and upload directory and files

 

but the files and directories aren't visible to other users?

How to create the files so that other users I give the app to can connect and save and upload new files?

 

I'm using 

var response = await client.Files.UploadAsync("/DotNetApi/" + subFolder + "/" + fileName, WriteMode.Overwrite.Instance, body: stream);

using (var response = await client.Files.DownloadAsync("/DotNetApi/" + szTemplate + "/" + file.Name))

which works on my computer

but when using another user computer says path not found

not sure how to setup the folder as shared ??

 

thanks

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    I'll be happy to help with any issues you're having with the Dropbox API/SDK, but I'll need some more information. Please reply with:

    • the version number of the platform and SDK you are using
    • the steps to reproduce the issue, including relevant code snippet(s) (for instance, which of the two lines you included is failing?), but don't include any access or refresh token(s)
    • the full text of any error or unexpected output
    • kdss-ja's avatar
      kdss-ja
      Explorer | Level 3

      Hi 

       

      My app is working on my computer fine.. but when installed on another users computer the 

      command 

      var list = await client.Files.ListFolderAsync("/DotNetApi/" + szTemplate);

      returns path not found

       

      When looking at the files in Windows Explorer or on Drop box it says the files / folders are only accessible to myself

      (so, I was wondering if I need to set them to shared or something?)

      using Dropbox.Api (6.37.0)

       

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        The Dropbox API/SDKs, such as the Dropbox .NET SDK you're using, list files by communicating with the Dropbox API servers, not the local filesystem.

         

        If the ListFolderAsync method is raising a path/not_found error, that indicates that there is nothing found at the specified path in the connected account. In this case, that would be the path identified by `/DotNetApi/" + szTemplate`, and the account for whichever access token/refresh token you're using in that particular installation.

         

        To list the root, you can call ListFolderAsync and instead specify a path value of the empty string "".

         

        If you need to check which account you're connected to, you can use the GetCurrentAccountAsync method.

         

        The File Access Guide may also be helpful for information on how interacting with files via the Dropbox API works.