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

kavayah's avatar
kavayah
Explorer | Level 3
6 years ago

Download file with special characters

Hello 

I have problem while downloading the file using .net dropbox API. The file contains special charaters any suggestion how to download a file with special charaters using Dropbox API. While trying to download its saying "path/not_found/...".

 

Special Charecters  like - ( . )  exp : at - (some time . GSK) name.pdf 

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

    I just tried this using DownloadAsync (example here) and it worked correctly for me. 

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

    - the steps to reproduce the issue
    - the name and version of the platform and SDK/library you are using
    - the full text of the error/any output
    - the relevant code snippet(s)

    • kavayah's avatar
      kavayah
      Explorer | Level 3

      Hello 

      The file name is "Tiny, Tone - (In DropBox) sample.pdf". Which is in my dropbox while downloading this file using Donwloadasync() it throws an error "path/malformed_path/".

      I am using .Net Dropbox.API version 4.9.3.

      Sample Code:

      string folder = "Test";
      string file = "Tiny, Tone - (In DropBox) sample.pdf";
      using (var response = await dbx.Files.DownloadAsync("/" + folder + "/" + file))
      {
      using (var fileStream = File.Create(@"C:\" + "sample.pdf"))
      {
      (await response.GetContentAsStreamAsync()).CopyTo(fileStream);
      }
      }

       

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

        Is that the exact code you're running? I just tried it with v4.9.3 of the .NET SDK, and it worked fine for me.

        A 'malformed_path' error indicates that the supplied path isn't in a valid format. The path "/Test/Tiny, Tone - (In DropBox) sample.pdf" is valid though, which is why I'm wondering if this code isn't exactly the same as what's running in your app.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 3 days ago
333 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!