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

mdiazl's avatar
mdiazl
Helpful | Level 5
2 years ago

Re: Get list of files in folders inside shared folders

Hi, it seems a bit old post, but I will try 🙂.

So it is not possible to download a shared file using the Dropbox library for Python?

If I use "files_download_to_file", I only see as "entry" the container folder but not the file that it contains. From the web I can see the folder and the file inside.
Any idea?

  • @Greg-DB Using " files_download_to_file" looks like it is not able to find the file shared. So I used the function to list all files that are within a folder ("files_list_folder") to be sure that the file was there, at this point,  I realized that it only returns me as entry the name of the folder.

    I tried also several options modifying its parameters such as "include_has_explicit_shared_members" or "include_mounted_folders" but the result was the same.
    The authentication was another war but finally it was solved.
    For the file, I created shared_link(with the user of the app) and it works correctly, I don't know why the first approach doesn't work, in any case now it is working.
    Thanks for your time.

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

    mdiazl You should be able to download a file in the connected account using the files_download_to_file method. That should work for files in shared folders as well, as long as the shared folder is mounted in the connected account. Alternatively, if you want to download a file from a shared link, you would instead use sharing_get_shared_link_file.

     

    There are a few forms of sharing on Dropbox and it's not completely clear what the set up is in your case, so please share some more information if you need help with this. For example, please share the relevant code you're running and the output you're getting so we can take a look. Be sure to redact any refresh token, access token, or app key/secret though.

    • mdiazl's avatar
      mdiazl
      Helpful | Level 5

      @Greg-DB Using " files_download_to_file" looks like it is not able to find the file shared. So I used the function to list all files that are within a folder ("files_list_folder") to be sure that the file was there, at this point,  I realized that it only returns me as entry the name of the folder.

      I tried also several options modifying its parameters such as "include_has_explicit_shared_members" or "include_mounted_folders" but the result was the same.
      The authentication was another war but finally it was solved.
      For the file, I created shared_link(with the user of the app) and it works correctly, I don't know why the first approach doesn't work, in any case now it is working.
      Thanks for your time.