Closed neeraj87 closed 7 years ago
node-ftps is a lftp
wrapper, can you check if you have lftp
installed on your computer?
lftp was not installed on my computer. I just installed it, but now it gives the following error:
Error getting file list: cd: Fatal error: Certificate verification: subjectAltName does not match ‘mydomain.com’
Another question I had was that I am making this node.js application for some clients to use but this means all of them have to have lftp installed on their computers. The end users for my app are not so tech savvy people, that's why this tool is being made for them where they can just give their ftp credentials and get the image import done.
For the SSL error, it's because the certificate is not valid for the domain. Try to use the autoConfirm: true
option.
What you can do is to create an API based on it and call your API from your application to avoid installing lftp
on their computers, or wrapping it in your application and calling the binary directly.
I have made the autoConfirm: true (in the code given above). But it is still showing this error.
So this is definitely an error from your SSL certificate on your server, not from node-ftps
Oh ok, I will diagnose the error and see if anything is missing from my side. Thanks for the help, I really appreciate it.
Hello @neeraj87 , did you manage to solve this?
I have FTP server which has a folder with a bunch of images in it. I do not know the image names. I want to access all the image files from that FTP folder and read them as base64 format one by one, so I can upload them to some other destination. I am trying to get the list of files in the ftp using the ls() method but run into the error below.
I get the following error:
Error getting file list: { [Error: spawn ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn' }