Hello,
I’m having trouble with the native plugin cordova-plugin-ftp.
I can connect to FTP, but the upload function does not send the file to FTP.
The code does not display an error in execution.
Would anyone know where the problem is?
sendFTP() {
this.file.checkFile(this.file.externalDataDirectory, ‘test.txt’)
.then(() => {
this.ftp.connect(‘myFTP’, ‘myUser’, ‘myPass’)
.then((res: any) => {
this.ftp.upload(this.file.externalDataDirectory + ‘/test.txt’,’/test.txt’);
}).catch((err) => {
this.showAlert(JSON.stringify(err))
})
})
.catch(() => {
this.showAlert(‘File not found!’)
})
}
dependencies:
“cordova-android”: “7.0.0”,
“@ionic-native/file”: “^4.10.1”,
“@ionic-native/ftp”: “^4.10.1”,
“cordova-plugin-file”: “^6.0.1”,
“cordova-plugin-ftp”: “^1.1.1”,