Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Retrieve contents of a public Dropbox folder?

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://dl.dropbox.com/u/1234567/publikPholder/textytext.txt

One would think that jumping up one level to the directory in the URL...

http://dl.dropbox.com/u/1234567/publikPholder/

...would show all the public files. Nope. Nothing but a 404.

like image 276
Sam Avatar asked Mar 19 '12 01:03

Sam


People also ask

How do I access files in someone else's Dropbox?

Request access to a shared folderClick the invitation link that you received. Click Request access. If you have more than one Dropbox account, select which account you'd like to add the shared folder to. Your request will be sent to the folder owner, and you'll be notified if the owner accepts your request.

Can Dropbox files be recovered?

Yes, recovering or restoring deleted files from Dropbox is simple. On dropbox.com, navigate to the Deleted files page, select the recoverable files or folders you'd like to recoup and click restore.

Why can't I see files in a shared Dropbox folder?

If you can't see files that you expect to see in a shared folder, then you may have unintentionally deleted the folder. Check that the folder you're looking at is still shared: Sign in to dropbox.com. Click Shared in the left sidebar.


2 Answers

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']);
like image 176
chrisn Avatar answered Sep 22 '22 15:09

chrisn


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

like image 45
Sam Avatar answered Sep 22 '22 15:09

Sam