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

fs.unlink error on req.connection.destroy() #256

Closed
klimashkin opened this issue Sep 17, 2013 · 3 comments
Closed

fs.unlink error on req.connection.destroy() #256

klimashkin opened this issue Sep 17, 2013 · 3 comments

Comments

@klimashkin
Copy link

Hello!
I have size check of post size, while user uploading file:

.on('progress', function (bytesReceived) {
    if (bytesReceived > maxPostSize) {
        console.log('~~~~', 'Too big, dropping');
        req.connection.destroy();
    }
})

It's ok, but node v10 always give me such message:
fs: missing callback Error: ENOENT, unlink 'proj\incoming\b37e2c105abcbef09d05df639923668b'

Why this happening?

@klimashkin
Copy link
Author

Or maybe I can use another method to cancel file uploading?

@OrangeDog
Copy link
Contributor

I use form._error() to simplify the error handling, but probably shouldn't.

@xarguments xarguments added the bug label Jan 30, 2019
@xarguments
Copy link
Collaborator

Hi @klimashkin, @OrangeDog
Now size check can be achieved using maxFieldSize and maxFileSize settings.

The issue is quite old and I'm going to close it. If I understood it incorrectly, or if it still persists, feel free to reopen or comment it. Thanks.

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

3 participants