I send some file by Ajax (POST)
and I would like to know what file's size already has been received by server in JS.
If its possible?
That's a very vague question, so I'm going to assume two things
So if those assumptions are correct you're going to need something to parse formdata on the backend I recommend multer
which is a middleware for express that handles file uploads and makes the files available on req.file
or req.files
(if uploading multiple files)
so to check the size of the file that was passed to server you just need to todo
req.file.size
and it should show you the filesize