1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Refactor user build and express file middlewares

This commit is contained in:
Chocobozzz 2022-03-04 10:57:36 +01:00
parent 90370f7cc8
commit d3d3deaa7a
No known key found for this signature in database
GPG key ID: 583A612D890159BE
14 changed files with 91 additions and 106 deletions

View file

@ -1,6 +1,5 @@
import express from 'express'
import { createAnyReqFiles } from '@server/helpers/express-utils'
import { CONFIG } from '@server/initializers/config'
import { MIMETYPES } from '@server/initializers/constants'
import { JobQueue } from '@server/lib/job-queue'
import { buildTaskFileFieldname, getTaskFile } from '@server/lib/video-editor'
@ -21,7 +20,6 @@ const editorRouter = express.Router()
const tasksFiles = createAnyReqFiles(
MIMETYPES.VIDEO.MIMETYPE_EXT,
CONFIG.STORAGE.TMP_DIR,
(req: express.Request, file: Express.Multer.File, cb: (err: Error, result?: boolean) => void) => {
const body = req.body as VideoEditorCreateEdition