aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/express-utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-06-29 11:35:25 +0200
committerChocobozzz <me@florianbigard.com>2023-06-29 11:35:25 +0200
commit6bd160a68dac55f61b28c7631f9985320daf7755 (patch)
tree8fa98847ef4e374f37a072a91e1eb804001b5fc7 /server/helpers/express-utils.ts
parent926c3f2b377196af1e8c5725aa54b8077cb79061 (diff)
downloadPeerTube-6bd160a68dac55f61b28c7631f9985320daf7755.tar.gz
PeerTube-6bd160a68dac55f61b28c7631f9985320daf7755.tar.zst
PeerTube-6bd160a68dac55f61b28c7631f9985320daf7755.zip
Fix 400 error on resumable re-upload
Diffstat (limited to 'server/helpers/express-utils.ts')
-rw-r--r--server/helpers/express-utils.ts8
1 files changed, 0 insertions, 8 deletions
diff --git a/server/helpers/express-utils.ts b/server/helpers/express-utils.ts
index 82dd4c178..783097e55 100644
--- a/server/helpers/express-utils.ts
+++ b/server/helpers/express-utils.ts
@@ -1,7 +1,6 @@
1import express, { RequestHandler } from 'express' 1import express, { RequestHandler } from 'express'
2import multer, { diskStorage } from 'multer' 2import multer, { diskStorage } from 'multer'
3import { getLowercaseExtension } from '@shared/core-utils' 3import { getLowercaseExtension } from '@shared/core-utils'
4import { HttpStatusCode } from '../../shared/models/http/http-error-codes'
5import { CONFIG } from '../initializers/config' 4import { CONFIG } from '../initializers/config'
6import { REMOTE_SCHEME } from '../initializers/constants' 5import { REMOTE_SCHEME } from '../initializers/constants'
7import { isArray } from './custom-validators/misc' 6import { isArray } from './custom-validators/misc'
@@ -59,12 +58,6 @@ function getHostWithPort (host: string) {
59 return host 58 return host
60} 59}
61 60
62function badRequest (_req: express.Request, res: express.Response) {
63 return res.type('json')
64 .status(HttpStatusCode.BAD_REQUEST_400)
65 .end()
66}
67
68function createReqFiles ( 61function createReqFiles (
69 fieldNames: string[], 62 fieldNames: string[],
70 mimeTypes: { [id: string]: string | string[] }, 63 mimeTypes: { [id: string]: string | string[] },
@@ -126,7 +119,6 @@ export {
126 getHostWithPort, 119 getHostWithPort,
127 createAnyReqFiles, 120 createAnyReqFiles,
128 isUserAbleToSearchRemoteURI, 121 isUserAbleToSearchRemoteURI,
129 badRequest,
130 createReqFiles, 122 createReqFiles,
131 cleanUpReqFiles, 123 cleanUpReqFiles,
132 getCountVideos 124 getCountVideos