Client-only Dropbox access

谁说我不能喝 提交于 2019-12-21 21:35:07

问题


I am trying to write an utility that logs into the user's Dropbox account and displays the files there (with some additional formatting, etc) in a browser. I would like to do this with only client-side technologies without any server-side code. Is this possible?

I found this: http://code.google.com/p/dropbox-js/ - haven't tried it yet. It doesn't have much documentation on how to get started. Any other alternatives?


回答1:


The Chooser API will not allow you to apply custom formatting to files.

If you want to display the user's entire Dropbox, create an application with Full Dropbox access, and use dropbox.js to read the user's Dropbox.

This walks you through setting up your application: https://github.com/dropbox/dropbox-js/blob/master/doc/getting_started.md

This particular snippet (List a Directory's Contents) is most relevant to you: https://github.com/dropbox/dropbox-js/blob/master/doc/getting_started.md#list-a-directorys-contents

readdir documentation: http://coffeedoc.info/github/dropbox/dropbox-js/master/classes/Dropbox/Client.html#readdir-instance

The checkbox.js sample application uses readdir here: https://github.com/dropbox/dropbox-js/blob/master/samples/checkbox.js/public/checkbox.coffee#L135

If you run into roadblocks, open an issue on the dropbox.js GitHub page.




回答2:


Check this out:

https://www.dropbox.com/developers/chooser

They have a specialised file for this. Try the demo and start using.



来源:https://stackoverflow.com/questions/12033537/client-only-dropbox-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!