cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you an educator? Well we want to hear from you, so check out some tools we think might help you out here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

APIV1 ListDirectory lowercase issue

APIV1 ListDirectory lowercase issue

Dangerd
New member | Level 2

Trying to download files in folder, folder names
Sometimes api returns normal character case, sometimes all are in lowercase:

                    [.tag] => file
                    [name] => 50.jpg
                    [path_lower] => /media/ready/22 morpeth road brampton, manny rodrigues/raw/50.jpg
                    [path_display] => /media/ready/22 morpeth road brampton, manny rodrigues/raw/50.jpg
                    [id] => id:4-SLqyMHQzAAAAAAAAByxw
                    [client_modified] => 2017-03-09T19:08:14Z
                    [server_modified] => 2017-03-10T05:36:23Z
                    [rev] => 3b2d30691b154
                    [size] => 2640198
                    [content_hash] => a36a55e022708935c19dd0e7c5e48ed8ef62477979348cd97ba299b02f1447fc
                )

path_display same as path_lower
while reading upper direcory:

           [10] => Array
                (
                    [.tag] => folder
                    [name] => 22 Morpeth Road Brampton, Manny Rodrigues
                    [path_lower] => /media/ready/22 morpeth road brampton, manny rodrigues
                    [path_display] => /media/Ready/22 Morpeth Road Brampton, Manny Rodrigues
                    [id] => id:4-SLqyMHQzAAAAAAAAByxg
                )

It has uppercase letters but first directory "media" is wrong, must be "Media"

How it can be fixed?

1 Reply 1

Re: APIV1 ListDirectory lowercase issue

Greg-DB
Dropboxer

Unfortunately due to some specifics of how Dropbox is implemented, not all of the path components can be guaranteed to have the expected casing.

You can find more information on this in the "Path formats" section under:

https://www.dropbox.com/developers/documentation/http/documentation#formats

There's also some information in the documentation for "path_display" if you expand "FileMetadata", e.g., under:

https://www.dropbox.com/developers/documentation/http/documentation#files-get_metadata

FileMetadata.name will contain the case-preserved name, so the workaround would be to build the path up from that.

By the way, for reference, your title mentions API v1, but your output is actually from API v2.

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?