aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-06-06 11:14:13 +0200
committerChocobozzz <me@florianbigard.com>2023-06-29 10:19:05 +0200
commitc37e305342c8655325f9606aa1f4b29abc471b39 (patch)
tree7d0529c0895c0522de9e77c8ab4d48e502599d2c /server/middlewares/validators
parent881958d17902b1efbb184400d7e5030cfc5b7224 (diff)
downloadPeerTube-c37e305342c8655325f9606aa1f4b29abc471b39.tar.gz
PeerTube-c37e305342c8655325f9606aa1f4b29abc471b39.tar.zst
PeerTube-c37e305342c8655325f9606aa1f4b29abc471b39.zip
Fix CI tests
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/videos/videos.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts
index fc2f95aa5..9034772c0 100644
--- a/server/middlewares/validators/videos/videos.ts
+++ b/server/middlewares/validators/videos/videos.ts
@@ -223,10 +223,12 @@ const videosAddResumableInitValidator = getCommonVideoEditAttributes().concat([
223 223
224 if (!isValidPasswordProtectedPrivacy(req, res)) return cleanup() 224 if (!isValidPasswordProtectedPrivacy(req, res)) return cleanup()
225 225
226 // multer required unsetting the Content-Type, now we can set it for node-uploadx 226 // Multer required unsetting the Content-Type, now we can set it for node-uploadx
227 req.headers['content-type'] = 'application/json; charset=utf-8' 227 req.headers['content-type'] = 'application/json; charset=utf-8'
228 // place previewfile in metadata so that uploadx saves it in .META 228
229 // Place thumbnail/previewfile in metadata so that uploadx saves it in .META
229 if (req.files?.['previewfile']) req.body.previewfile = req.files['previewfile'] 230 if (req.files?.['previewfile']) req.body.previewfile = req.files['previewfile']
231 if (req.files?.['thumbnailfile']) req.body.thumbnailfile = req.files['thumbnailfile']
230 232
231 return next() 233 return next()
232 } 234 }