diff options
author | Chocobozzz <me@florianbigard.com> | 2023-06-29 11:35:25 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-06-29 11:35:25 +0200 |
commit | 6bd160a68dac55f61b28c7631f9985320daf7755 (patch) | |
tree | 8fa98847ef4e374f37a072a91e1eb804001b5fc7 /server/helpers/express-utils.ts | |
parent | 926c3f2b377196af1e8c5725aa54b8077cb79061 (diff) | |
download | PeerTube-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.ts | 8 |
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 @@ | |||
1 | import express, { RequestHandler } from 'express' | 1 | import express, { RequestHandler } from 'express' |
2 | import multer, { diskStorage } from 'multer' | 2 | import multer, { diskStorage } from 'multer' |
3 | import { getLowercaseExtension } from '@shared/core-utils' | 3 | import { getLowercaseExtension } from '@shared/core-utils' |
4 | import { HttpStatusCode } from '../../shared/models/http/http-error-codes' | ||
5 | import { CONFIG } from '../initializers/config' | 4 | import { CONFIG } from '../initializers/config' |
6 | import { REMOTE_SCHEME } from '../initializers/constants' | 5 | import { REMOTE_SCHEME } from '../initializers/constants' |
7 | import { isArray } from './custom-validators/misc' | 6 | import { isArray } from './custom-validators/misc' |
@@ -59,12 +58,6 @@ function getHostWithPort (host: string) { | |||
59 | return host | 58 | return host |
60 | } | 59 | } |
61 | 60 | ||
62 | function badRequest (_req: express.Request, res: express.Response) { | ||
63 | return res.type('json') | ||
64 | .status(HttpStatusCode.BAD_REQUEST_400) | ||
65 | .end() | ||
66 | } | ||
67 | |||
68 | function createReqFiles ( | 61 | function 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 |