aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-05 14:24:03 +0200
committerChocobozzz <me@florianbigard.com>2021-08-05 14:24:03 +0200
commit45570e93974fd8902a724c24f5a10aea747350e0 (patch)
treea754b01d60771a99177e6e86a5c3e3bc59ef4bef /server/middlewares/validators
parent27db78400c558e19bfac0da885fe0b7d0a3e6a0c (diff)
downloadPeerTube-45570e93974fd8902a724c24f5a10aea747350e0.tar.gz
PeerTube-45570e93974fd8902a724c24f5a10aea747350e0.tar.zst
PeerTube-45570e93974fd8902a724c24f5a10aea747350e0.zip
Fix upload without files
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/videos/videos.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts
index 374a59c50..13187f398 100644
--- a/server/middlewares/validators/videos/videos.ts
+++ b/server/middlewares/validators/videos/videos.ts
@@ -188,7 +188,7 @@ const videosAddResumableInitValidator = getCommonVideoEditAttributes().concat([
188 // multer required unsetting the Content-Type, now we can set it for node-uploadx 188 // multer required unsetting the Content-Type, now we can set it for node-uploadx
189 req.headers['content-type'] = 'application/json; charset=utf-8' 189 req.headers['content-type'] = 'application/json; charset=utf-8'
190 // place previewfile in metadata so that uploadx saves it in .META 190 // place previewfile in metadata so that uploadx saves it in .META
191 if (req.files['previewfile']) req.body.previewfile = req.files['previewfile'] 191 if (req.files?.['previewfile']) req.body.previewfile = req.files['previewfile']
192 192
193 return next() 193 return next()
194 } 194 }