aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/types/express.d.ts
diff options
context:
space:
mode:
authorkontrollanten <6680299+kontrollanten@users.noreply.github.com>2022-06-21 15:31:25 +0200
committerGitHub <noreply@github.com>2022-06-21 15:31:25 +0200
commit2e401e8575decb1d491d0db48ca1ab1eba5b2a66 (patch)
treeeee1e6213ca4d635837ca01c2bdc5c876b8d8b7d /server/types/express.d.ts
parentdec49521556fc228c6e05b6199e9b07f619b38fb (diff)
downloadPeerTube-2e401e8575decb1d491d0db48ca1ab1eba5b2a66.tar.gz
PeerTube-2e401e8575decb1d491d0db48ca1ab1eba5b2a66.tar.zst
PeerTube-2e401e8575decb1d491d0db48ca1ab1eba5b2a66.zip
store uploaded video filename (#4885)
* store uploaded video filename closes #4731 * dont crash if videos channel exist * migration: use raw query * video source: fixes after code review * cleanup * bump migration * updates after code review * refactor: use checkUserCanManageVideo * videoSource: add openapi doc * test(check-params/video-source): fix timeout * Styling * Correctly set original filename as source Co-authored-by: Chocobozzz <me@florianbigard.com>
Diffstat (limited to 'server/types/express.d.ts')
-rw-r--r--server/types/express.d.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/types/express.d.ts b/server/types/express.d.ts
index 7cc13f21d..27e532c31 100644
--- a/server/types/express.d.ts
+++ b/server/types/express.d.ts
@@ -42,6 +42,7 @@ import {
42 MVideoThumbnail 42 MVideoThumbnail
43} from './models' 43} from './models'
44import { Writable } from 'stream' 44import { Writable } from 'stream'
45import { MVideoSource } from './models/video/video-source'
45 46
46declare module 'express' { 47declare module 'express' {
47 export interface Request { 48 export interface Request {
@@ -68,7 +69,7 @@ declare module 'express' {
68 } | UploadFileForCheck[] 69 } | UploadFileForCheck[]
69 70
70 // Upload file with a duration added by our middleware 71 // Upload file with a duration added by our middleware
71 export type VideoUploadFile = Pick<Express.Multer.File, 'path' | 'filename' | 'size'> & { 72 export type VideoUploadFile = Pick<Express.Multer.File, 'path' | 'filename' | 'size', 'originalname'> & {
72 duration: number 73 duration: number
73 } 74 }
74 75
@@ -85,6 +86,7 @@ declare module 'express' {
85 duration: number 86 duration: number
86 path: string 87 path: string
87 filename: string 88 filename: string
89 originalname: string
88 } 90 }
89 91
90 // Extends Response with added functions and potential variables passed by middlewares 92 // Extends Response with added functions and potential variables passed by middlewares
@@ -123,6 +125,8 @@ declare module 'express' {
123 125
124 videoShare?: MVideoShareActor 126 videoShare?: MVideoShareActor
125 127
128 videoSource?: MVideoSource
129
126 videoFile?: MVideoFile 130 videoFile?: MVideoFile
127 131
128 videoFileResumable?: EnhancedUploadXFile 132 videoFileResumable?: EnhancedUploadXFile