Fix upload without files

pull/4317/head
Chocobozzz 2021-08-05 14:24:03 +02:00
parent 27db78400c
commit 45570e9397
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ const videosAddResumableInitValidator = getCommonVideoEditAttributes().concat([
// multer required unsetting the Content-Type, now we can set it for node-uploadx // multer required unsetting the Content-Type, now we can set it for node-uploadx
req.headers['content-type'] = 'application/json; charset=utf-8' req.headers['content-type'] = 'application/json; charset=utf-8'
// place previewfile in metadata so that uploadx saves it in .META // place previewfile in metadata so that uploadx saves it in .META
if (req.files['previewfile']) req.body.previewfile = req.files['previewfile'] if (req.files?.['previewfile']) req.body.previewfile = req.files['previewfile']
return next() return next()
} }