Skip to content
New issue

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

Could someone help me with a custom size limit? #358

Open
calmseagrass opened this issue Jul 4, 2023 · 0 comments
Open

Could someone help me with a custom size limit? #358

calmseagrass opened this issue Jul 4, 2023 · 0 comments

Comments

@calmseagrass
Copy link

Hey there,

I have seen an other issue that helped someone but I'm not sure how to do it myself, I used the example code of the readme as a basis:

const FtpSrv = require('ftp-srv');

const port=21;
const ftpServer = new FtpSrv({
    url: "ftp://0.0.0.0:" + port,
    anonymous: true
});

ftpServer.on('login', ({ connection, username, password }, resolve, reject) => { 
    if(username === 'anonymous' && password === 'anonymous'){
        return resolve({ root:"/" });    
    }
    return reject(new errors.GeneralError('Invalid username or password', 401));
});

ftpServer.listen().then(() => { 
    console.log('Ftp server is starting...')
});

Could someone help me to implement this: #196

Greetings
calmseagrass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant