an-rahulpandey / cordova-plugin-dbcopy

Copy SQLite Database from www folder to default app database location
Apache License 2.0
89 stars 47 forks source link

Suggest: hability to copy from an http #19

Open calebeaires opened 8 years ago

calebeaires commented 8 years ago

I would be great if this plugin were able to copy from an HTTP location

diegodotta commented 8 years ago

Would be really great!!! This plugin rocks!

rafaellop commented 7 years ago

It would be better if the plugin could export and import databases to a cloud drives like Google Drive, Dropbox and other. The current features, especially on iOS, limits the usage of the plugin for backup/restore features to none. It works for a scenario when the db is backed up on the same device and restoration is also on the same device, but if a user wanted to move the database to a different device, it is impossible or at least very, very hard.

It would be so great if the plugin could save and restore databases from a cloud services that are private to the app user and it would be so simple and elegant to use the plugin without the need to create the whole api for a database storage on a server. The privacy issues are also important. So @an-rahulpandey please consider this.

At the moment I need:

To backup:

To restore:

Or maybe you have some other ideas?

an-rahulpandey commented 7 years ago

You can use cordova file transfer to upload and download the db from cloud. Currently have no plan to do so, it will require lots of coding. Each cloud service has their own authentication methods,upload, download method. It would become very difficult to maintain after a while.

rafaellop commented 7 years ago

I must agree. It would be very difficult. Thanks for the tip about the file transfer plugin. I knew it but somehow forgotten it would be suitable for this case. By the way, would it be possible to copyDbToStorage() but under a different destination name than the first parameter for this method? The copyDbFromStorage() already works that way allowing to copy db from a different name and save under the name as used in the app. Would be great to have this option for the sister method too.