diff options
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) |