There is no onFileUploadStart
with the new multer
API. If you want to limit the file size, you should instead add limits: { fileSize: maxSize }
to the object passed to multer()
:
var upload = multer({
storage: storage,
limits: { fileSize: maxSize }
}).single('bestand');