i m trying to upload a file local server to remote server, but am getting issue with upload a file into remote server also in my below code not getting error too.
var multer = require('multer')
var sftpStorage = require('multer-sftp')
var storage = sftpStorage({
sftp: {
host: 'ip address',
port: '22',
username: 'xxxxxxxxxx',
password: 'yyyyyyyyy'
},
destination: function (req, file, cb) {
return cb(null, '/home/g457b5jxaq4m/public_html/shiva')
},
filename: function (req, file, cb) { return cb(null, '/home/sivaprakash/Desktop/cre.txt') }
})
var upload = multer({ storage: storage })
please kindly check my code and let me know if any mistake.