mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-09-11 13:37:10 +03:00
Fix upload without files
This commit is contained in:
parent
27db78400c
commit
45570e9397
@ -188,7 +188,7 @@ const videosAddResumableInitValidator = getCommonVideoEditAttributes().concat([
|
||||
// multer required unsetting the Content-Type, now we can set it for node-uploadx
|
||||
req.headers['content-type'] = 'application/json; charset=utf-8'
|
||||
// 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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user