We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here. 

Forum Discussion

MooMoo_polar's avatar
MooMoo_polar
Explorer | Level 3
8 months ago

Using files_download_to_file method without Metadata.path_lower

 

Hello. I would like to download 900+ files in the shared link folder using python SDK.

 

I use files_download_to_file method which required Metadata.path_lower from files_list_folder method.
However, when I print a file's value from files_list_folder, the path_lower returns None value.

 

I'm curious how could I download files without Metadata.path_lower using files_download_to_file method, or any other download method is okay.

I would like to make the script to run automatically.

 

Thank you in advance.

  • If that path values are not set, that indicates that the item is not mounted under the account/root for that call. For example, you may be using an access token for an account that doesn't contain that linked item.

     

    To download a file from a shared link for a folder containing that file, you should use the sharing_get_shared_link_file method. The 'url' parameter should be the shared link to the folder, and the 'path' parameter should be the relative path to the desired file inside that folder, which you can build from the 'name' values of the entries returned by files_list_folder/files_list_folder_continue. For example, if the linked folder contains a file named "file.ext", the "path" would be "/file.ext". Or, for example, if the linked folder contains a subfolder named "subfolder", and that subfolder contains a file named "file.ext", the "path" would be
    "/subfolder/file.ext".

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

    If that path values are not set, that indicates that the item is not mounted under the account/root for that call. For example, you may be using an access token for an account that doesn't contain that linked item.

     

    To download a file from a shared link for a folder containing that file, you should use the sharing_get_shared_link_file method. The 'url' parameter should be the shared link to the folder, and the 'path' parameter should be the relative path to the desired file inside that folder, which you can build from the 'name' values of the entries returned by files_list_folder/files_list_folder_continue. For example, if the linked folder contains a file named "file.ext", the "path" would be "/file.ext". Or, for example, if the linked folder contains a subfolder named "subfolder", and that subfolder contains a file named "file.ext", the "path" would be
    "/subfolder/file.ext".

    • MooMoo_polar's avatar
      MooMoo_polar
      Explorer | Level 3

      Thank you for the support.

      I've tried sharing_get_shared_link_file method and it works well.

  • Здравко's avatar
    Здравко
    Legendary | Level 20

    MooMoo_polar wrote:

    ...

    I'm curious how could I download files without Metadata.path_lower using files_download_to_file method, or any other download method is okay.

    I would like to make the script to run automatically.

    ...


    Hi MooMoo_polar,

    A way to do what you want can be seen here. 😉

    Hope this helps.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,876 PostsLatest Activity: 5 hours ago
325 Following

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 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!