-const videosResumableUploadIdValidator = [
- (req: express.Request, res: express.Response, next: express.NextFunction) => {
- const user = res.locals.oauth.token.User
- const uploadId = req.query.upload_id
-
- if (uploadId.startsWith(user.id + '-') !== true) {
- return res.fail({
- status: HttpStatusCode.FORBIDDEN_403,
- message: 'You cannot send chunks in another user upload'
- })
- }
-
- return next()
- }
-]
-