diff options
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/thumbnail.ts | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/server/models/video/thumbnail.ts b/server/models/video/thumbnail.ts index f1952dcc1..e68a6711f 100644 --- a/server/models/video/thumbnail.ts +++ b/server/models/video/thumbnail.ts | |||
@@ -1,6 +1,18 @@ | |||
1 | import { join } from 'path' | 1 | import { join } from 'path' |
2 | import { AfterDestroy, AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' | 2 | import { |
3 | import { LAZY_STATIC_PATHS, STATIC_PATHS, WEBSERVER } from '../../initializers/constants' | 3 | AfterDestroy, |
4 | AllowNull, | ||
5 | BelongsTo, | ||
6 | Column, | ||
7 | CreatedAt, | ||
8 | DataType, | ||
9 | Default, | ||
10 | ForeignKey, | ||
11 | Model, | ||
12 | Table, | ||
13 | UpdatedAt | ||
14 | } from 'sequelize-typescript' | ||
15 | import { CONSTRAINTS_FIELDS, LAZY_STATIC_PATHS, STATIC_PATHS, WEBSERVER } from '../../initializers/constants' | ||
4 | import { logger } from '../../helpers/logger' | 16 | import { logger } from '../../helpers/logger' |
5 | import { remove } from 'fs-extra' | 17 | import { remove } from 'fs-extra' |
6 | import { CONFIG } from '../../initializers/config' | 18 | import { CONFIG } from '../../initializers/config' |
@@ -41,7 +53,7 @@ export class ThumbnailModel extends Model<ThumbnailModel> { | |||
41 | type: ThumbnailType | 53 | type: ThumbnailType |
42 | 54 | ||
43 | @AllowNull(true) | 55 | @AllowNull(true) |
44 | @Column | 56 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.COMMONS.URL.max)) |
45 | fileUrl: string | 57 | fileUrl: string |
46 | 58 | ||
47 | @AllowNull(true) | 59 | @AllowNull(true) |