diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-11 14:52:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-12-11 15:11:09 +0100 |
commit | 14e2014acc1362cfbb770c051a7254b156cd8efb (patch) | |
tree | 8b7d5aedd9fe0beff8b971c9bae7781ba2069228 /server/models/video/video-file.ts | |
parent | 8923187455c5aa7167d813c5c745d3857f183fd7 (diff) | |
download | PeerTube-14e2014acc1362cfbb770c051a7254b156cd8efb.tar.gz PeerTube-14e2014acc1362cfbb770c051a7254b156cd8efb.tar.zst PeerTube-14e2014acc1362cfbb770c051a7254b156cd8efb.zip |
Support additional video extensions
Diffstat (limited to 'server/models/video/video-file.ts')
-rw-r--r-- | server/models/video/video-file.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts index adebdf0c7..3fd2d5a99 100644 --- a/server/models/video/video-file.ts +++ b/server/models/video/video-file.ts | |||
@@ -14,6 +14,7 @@ import { | |||
14 | UpdatedAt | 14 | UpdatedAt |
15 | } from 'sequelize-typescript' | 15 | } from 'sequelize-typescript' |
16 | import { | 16 | import { |
17 | isVideoFileExtnameValid, | ||
17 | isVideoFileInfoHashValid, | 18 | isVideoFileInfoHashValid, |
18 | isVideoFileResolutionValid, | 19 | isVideoFileResolutionValid, |
19 | isVideoFileSizeValid, | 20 | isVideoFileSizeValid, |
@@ -58,7 +59,8 @@ export class VideoFileModel extends Model<VideoFileModel> { | |||
58 | size: number | 59 | size: number |
59 | 60 | ||
60 | @AllowNull(false) | 61 | @AllowNull(false) |
61 | @Column(DataType.ENUM(values(CONSTRAINTS_FIELDS.VIDEOS.EXTNAME))) | 62 | @Is('VideoFileExtname', value => throwIfNotValid(value, isVideoFileExtnameValid, 'extname')) |
63 | @Column | ||
62 | extname: string | 64 | extname: string |
63 | 65 | ||
64 | @AllowNull(false) | 66 | @AllowNull(false) |