We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi there. Im using last package's version.
const FtpSrv = require('ftp-srv'); const port=5350; const ftpServer = new FtpSrv({ url: "ftp://0.0.0.0:" + port, anonymous: false, file_format: "ls", tls: false, greeting: ["Hello"], timeout: 6000, });
ftpServer.on('login', ({ connection, username, password }, resolve, reject) => { if (username === "login" && password === "pass") { connection.on("STOR", (error, fileName) => { if (error) { console.error( FTP server error: could not receive file ${fileName} for upload ${error} ); } else { console.info(FTP server: plate number successfully received - ${fileName}); return resolve({ root:"/" }); } }); } return reject(new errors.GeneralError('Invalid username or password', 401)); });
FTP server error: could not receive file ${fileName} for upload ${error}
FTP server: plate number successfully received - ${fileName}
ftpServer.listen().then(() => { console.log('Ftp server is starting...') });
Thanks for your help.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi there.
Im using last package's version.
const FtpSrv = require('ftp-srv');
const port=5350;
const ftpServer = new FtpSrv({
url: "ftp://0.0.0.0:" + port,
anonymous: false,
file_format: "ls",
tls: false,
greeting: ["Hello"],
timeout: 6000,
});
ftpServer.on('login', ({ connection, username, password }, resolve, reject) => {
if (username === "login" && password === "pass") {
connection.on("STOR", (error, fileName) => {
if (error) {
console.error(
FTP server error: could not receive file ${fileName} for upload ${error}
);
}
else {
console.info(
FTP server: plate number successfully received - ${fileName}
);return resolve({ root:"/" });
}
});
}
return reject(new errors.GeneralError('Invalid username or password', 401));
});
ftpServer.listen().then(() => {
console.log('Ftp server is starting...')
});
Thanks for your help.
The text was updated successfully, but these errors were encountered: