Do I need a Dropbox app to upload files to my own Dropbox?
I want to push files from a server to my own Dropbox. I'm fine with storing an API token or even (although reluctantly) the account password on the server. I don't want to install Dropbox on the server.
Do I still need to create an app at Dropbox Developer Home? I feel like I'm cluttering the app namespace - of course I could just use a UUID. Also, I don't want the app listed anywhere or have other users be able to authorize the app to their Dropbox account.
There are two ways you can programmatically interact with Dropbox:
For 1, you do need to register an API app, but I wouldn't worry about cluttering the app namespace. There are a lot of apps that use Dropbox nowadays anyway. Just use a relatively distinct name, perhaps distinct to you specifically.
Also, Dropbox itself doesn't make anything about registered apps publicly available anywhere. You're in control of it completely.
And using the API, you don't need to store the password, just the app token and access token. (You just need to process the auth flow once to get and store the access token.)
In addition, if you only need to link to your own account, you don't even need to apply for 'production' status.
For 2, you don't need to register an API app, but you would need to install the client on the machine. Then you can just interact with the local filesystem directly, and let the client handle the rest. (Also, Dropbox doesn't work over FTP, though you may be able to hack something together where the machine pushes the file over FTP onto a machine where the client is running.)
Since Dropbox is mirroring a real file folder, you can put something in Dropbox by any method which can copy a file. You could use ftp from your server to an instance of your Dropbox folder, or just download a file.
链接地址: http://www.djcxy.com/p/69076.html上一篇: 上传Dropbox中文件的新分区