chore: console log multipart early resolve

This commit is contained in:
Bobby 2022-09-28 10:32:45 +07:00
parent b3a2c93642
commit 0b46f43bfa
No known key found for this signature in database
GPG Key ID: 941839794CBF5A09

View File

@ -506,12 +506,11 @@ self.actuallyUpload = async (req, res, data = {}) => {
// If for some reason Request.multipart() resolves before a file's Promise
// Typically caused by something hanging up longer than
// uWebSockets.js' internal security timeout (10 seconds)
if (req.files.some(file => file.promised !== true)) {
if (req.files.some(file => !file.promised)) {
// Clean up temp files and held identifiers (do not wait)
cleanUpFiles()
unfreezeChunksData()
throw new ServerError()
throw new Error('Request.multipart() resolved before a file\'s Promise')
}
// If chunked uploads is enabled and the uploaded file is a chunk, then just say that it was a success