diff options
author | Chocobozzz <me@florianbigard.com> | 2019-12-17 09:55:33 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-12-17 09:55:33 +0100 |
commit | 2735a154dc77316e584bc784c65e904df791067f (patch) | |
tree | b564534f8f0cf07ebd5b0b8d460b32dcd19be00e /server/models/video | |
parent | 1a5fd848b461aac6ea1ec1d2bee62032024ba49d (diff) | |
download | PeerTube-2735a154dc77316e584bc784c65e904df791067f.tar.gz PeerTube-2735a154dc77316e584bc784c65e904df791067f.tar.zst PeerTube-2735a154dc77316e584bc784c65e904df791067f.zip |
Fix video import with long thumbnail url
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) |