Posted by alonpeer on September 16, 2010 at 5:48pm
9 followers
| Project: | Backup and Migrate Dropbox |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | wundo |
| Status: | closed (fixed) |
Issue Summary
I'd like to be able to set up my Dropbox account as a destination for the backups.
The destination page should let me enter my Dropbox credentials, and a target folder inside my Dropbox account.
This feature can use the Dropbox Uploader class (http://jaka.kubje.org/projects/dropbox-uploader/) just like the Dropbox Integration module.
Comments
#1
Another possible library to be used: http://code.google.com/p/dropbox-php/
#2
I'm not good with patches and stuff.
In any case, here's a prototype I created that implements this using the Dropbox Uploader library.
<?php'dropbox' => array(
'description' => t('Save the backup files to a !link account.', array('!link' => l(t('Dropbox'), 'http://www.dropbox.com/'))),
'file' => drupal_get_path('module', 'backup_migrate') .'/includes/destinations.dropbox.inc',
'class' => 'backup_migrate_destination_dropbox',
'type_name' => t('Dropbox'),
'can_create' => TRUE,
),
?>
And that's it, you are ready to go.
NOTICE: The Dropbox Uploader library only supports file uploads and not the full Dropbox API via OAuth. I chose to use it because it was quick and easy, and it doesn't involve any special PEAR libraries etc. like the Google Code implementation.
If someone can create a patch from this, I would be grateful. Also, any comments are welcome.
#3
#4
OK, I give up. Here's my patch.
#5
Subscribing
#6
Moving this to 6.x-2.x-dev, maybe this way it'll get some attention.
#7
No attention...?
#8
Thanks for the hard work on this. Since the dropbox module promises API support, I'd love to see a solution that leverages the work done there, especially if third party libraries are required for this to work.
#9
Subscribing.
#10
Thanks, this looks very interesting. Subscribing...
#11
https://www.dropbox.com/developers/docs#authentication-for-mobile-devices
Mobile authentication is done using a call named token that's in the Mobile API specification section. Token takes a user's username and password and returns a working access token/secret pair to your application that you can use from then on. It's a relatively simple process, but with one caveat: you cannot store the user's password in your application. You can store a username for usability purposes or in case re-authentication is needed. However, there is no reason you should store their password.
In fact, because you are receiving a working OAuth access token for the user, there's really no need to store their username and password in your application at all. Simply store the tokens instead and use them in all of your subsequent calls. The Objective-C libraries in the SDK actually do this for you in order to make sure you get it right the first time.
It's worth mentioning here that the tokens given out via the mobile authentication process don't expire for ten years.
#12
Module created, please take a look here: http://drupal.org/project/backup_migrate_dropbox
#13
#14
Keeping track of this thread...
#15
Automatically closed -- issue fixed for 2 weeks with no activity.