Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Brendan D.
11 years agoExplorer | Level 4
Wrong character case of folder name when calling listFolder using Sync API
I'm traversing a folder hierarchy and have come across a strange anomaly in the letter case of one of my folders.
When I call listFolder to get the hierarchy of my folders, everything seems normal...
Steve M.
Dropbox Staff
10 years agoThis specific thread is about the Sync API, which is deprecated, so we won't be making changes to it.
More generally, /delta (API v1) and /files/list_folder (API v2) behave similarly in that only the last path segment is "correctly" cased (according to the current casing of the file). There are no immediate plans to change that, so my advice is to treat the Dropbox API as case-insensitive, since it is.
For the scenario raised here, of trying to locate files on the local file system, the only good way to do this is to maintain your own mapping of lowercased paths to cased paths in the local file system. Because Dropbox itself is case insensitive, if we returned you a fully cased path, it may still not match the local file system. E.g. you wrote a file called Hello.txt and uploaded it to Dropbox as Hello.txt. The user then renamed it to HELLO.TXT. Now if the API told you the path was HELLO.TXT, you wouldn't be able to find the file on the local file system, where no such file exists. If instead, your app kept track of "Hello.txt is the local path for /hello.txt in Dropbox," there would be no such problem.
So although we may revisit over time returning different information about the current casing of a file path in Dropbox, the fact that Dropbox itself is case-insensitive means that your app will need to maintain its own mapping when dealing with something like a case-sensitive file system.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!