Retrieve contents of a public Dropbox folder?

后端 未结 3 416
轻奢々
轻奢々 2021-02-06 06:31

Is there a way to retrieve a list of the contents of a public Dropbox folder (preferably in PHP)? This is what a URL to a public file in Dropbox looks like:

http         


        
相关标签:
3条回答
  • 2021-02-06 07:04

    Looks like this library is pretty complete (although I haven't used it myself), and is probably as simple as (post-auth):

    $info = $dropbox->getMetaData('Public', true);
    print_r($info['contents']);
    
    0 讨论(0)
  • 2021-02-06 07:16

    You can use the Dropbox API, specifically the search path. This just returns JSON, which is easy enough to parse.

    If you want to just have an index file on your own public Dropbox you can take this approach: http://forums.dropbox.com/topic.php?id=54966.

    This generates an index in Python: http://forums.dropbox.com/topic.php?id=17432

    0 讨论(0)
  • 2021-02-06 07:21

    UPDATE: I found a thread on the Dropbox forums where a user posts a link that claims to enable something pretty close to what I'm asking for. Guess what? It works! I don't know where it came from or where it's documented, but if it's helpful to anyone else, here it is (clicking this link will enable it and I don't know if it can be disabled. Proceed with caution):

    https://www.dropbox.com/enable_shmodel

    The resulting public folder looks like this:

    enter image description here

    0 讨论(0)
提交回复
热议问题