I have an Ionic2 application. All the data stored in SQLite db. When the user signed out from the application, I need to take the back up of sqlite and upload it to Google Drive.
Could anybody help me to crack this?
Edit
Added cordova plugin to transfer file cordova-plugin-file-transfer
Upload method
upload() {
let options: FileUploadOptions = {
fileKey: 'file',
fileName: '<file name>',
headers: {<Authorization headers>}
}
fileTransfer.upload('<file path>', '<google drive api>', options)
.then((data) => {
}, (err) => {
})
}