diff options
Diffstat (limited to 'server/middlewares/validators/videos/videos.ts')
-rw-r--r-- | server/middlewares/validators/videos/videos.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index 49e10e2b5..13187f398 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts | |||
@@ -6,7 +6,7 @@ import { getServerActor } from '@server/models/application/application' | |||
6 | import { ExpressPromiseHandler } from '@server/types/express' | 6 | import { ExpressPromiseHandler } from '@server/types/express' |
7 | import { MUserAccountId, MVideoFullLight } from '@server/types/models' | 7 | import { MUserAccountId, MVideoFullLight } from '@server/types/models' |
8 | import { ServerErrorCode, UserRight, VideoPrivacy } from '../../../../shared' | 8 | import { ServerErrorCode, UserRight, VideoPrivacy } from '../../../../shared' |
9 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | 9 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' |
10 | import { | 10 | import { |
11 | exists, | 11 | exists, |
12 | isBooleanValid, | 12 | isBooleanValid, |
@@ -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 | } |