aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-12-17 09:55:33 +0100
committerChocobozzz <me@florianbigard.com>2019-12-17 09:55:33 +0100
commit2735a154dc77316e584bc784c65e904df791067f (patch)
treeb564534f8f0cf07ebd5b0b8d460b32dcd19be00e /server/models
parent1a5fd848b461aac6ea1ec1d2bee62032024ba49d (diff)
downloadPeerTube-2735a154dc77316e584bc784c65e904df791067f.tar.gz
PeerTube-2735a154dc77316e584bc784c65e904df791067f.tar.zst
PeerTube-2735a154dc77316e584bc784c65e904df791067f.zip
Fix video import with long thumbnail url
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/thumbnail.ts18
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 @@
1import { join } from 'path' 1import { join } from 'path'
2import { AfterDestroy, AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' 2import {
3import { 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'
15import { CONSTRAINTS_FIELDS, LAZY_STATIC_PATHS, STATIC_PATHS, WEBSERVER } from '../../initializers/constants'
4import { logger } from '../../helpers/logger' 16import { logger } from '../../helpers/logger'
5import { remove } from 'fs-extra' 17import { remove } from 'fs-extra'
6import { CONFIG } from '../../initializers/config' 18import { 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)