Issue in ftp file do

Hi,
I have a problem with Ionic native ftp

I want to download and upload files through the FTP server.

const localPath = Directory.Documents + “/text.txt”
FTP.connect(userIp, userName, userPassword).then((result: any) => {
const data = FTP.upload(
localPath,
“/sample.txt”
)
alert(JSON.stringify(data))
})

and it always through errors like

{“_isScalar”:false}

someone, please let me know if this is the right way or not to take the local path and remorted path.

thanks.

i have also tried with this

await Filesystem.writeFile({
path: ‘text12.txt’,
data: “This is a test”,
directory: Directory.Documents,
encoding: Encoding.UTF8,
}).then((result) => {
FTP.connect(userIp, userName, userPassword).then((updatedREsult: any) => {
const data = FTP.upload(result.uri, “/sample.txt”)
alert(JSON.stringify(data))
})
}).catch((error) => {
alert(error)
});

this is my file path