diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-08 09:33:03 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-08 10:01:50 +0200 |
commit | ea54cd04c1ff0e55651cd5fb1a83672acde68604 (patch) | |
tree | 4e10fea658e72a9f79375d0e9b23d08915d3d0b2 /server/models/actor | |
parent | 295106516277581ba4967199fa5580264a90ae2c (diff) | |
download | PeerTube-ea54cd04c1ff0e55651cd5fb1a83672acde68604.tar.gz PeerTube-ea54cd04c1ff0e55651cd5fb1a83672acde68604.tar.zst PeerTube-ea54cd04c1ff0e55651cd5fb1a83672acde68604.zip |
Fix video upload with a capitalized ext
Diffstat (limited to 'server/models/actor')
-rw-r--r-- | server/models/actor/actor.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/actor/actor.ts b/server/models/actor/actor.ts index 65c53f8f8..0cd30f545 100644 --- a/server/models/actor/actor.ts +++ b/server/models/actor/actor.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import { values } from 'lodash' | 1 | import { values } from 'lodash' |
2 | import { extname } from 'path' | ||
3 | import { literal, Op, Transaction } from 'sequelize' | 2 | import { literal, Op, Transaction } from 'sequelize' |
4 | import { | 3 | import { |
5 | AllowNull, | 4 | AllowNull, |
@@ -17,6 +16,7 @@ import { | |||
17 | Table, | 16 | Table, |
18 | UpdatedAt | 17 | UpdatedAt |
19 | } from 'sequelize-typescript' | 18 | } from 'sequelize-typescript' |
19 | import { getLowercaseExtension } from '@server/helpers/core-utils' | ||
20 | import { ModelCache } from '@server/models/model-cache' | 20 | import { ModelCache } from '@server/models/model-cache' |
21 | import { AttributesOnly } from '@shared/core-utils' | 21 | import { AttributesOnly } from '@shared/core-utils' |
22 | import { ActivityIconObject, ActivityPubActorType } from '../../../shared/models/activitypub' | 22 | import { ActivityIconObject, ActivityPubActorType } from '../../../shared/models/activitypub' |
@@ -567,7 +567,7 @@ export class ActorModel extends Model<Partial<AttributesOnly<ActorModel>>> { | |||
567 | let image: ActivityIconObject | 567 | let image: ActivityIconObject |
568 | 568 | ||
569 | if (this.avatarId) { | 569 | if (this.avatarId) { |
570 | const extension = extname(this.Avatar.filename) | 570 | const extension = getLowercaseExtension(this.Avatar.filename) |
571 | 571 | ||
572 | icon = { | 572 | icon = { |
573 | type: 'Image', | 573 | type: 'Image', |
@@ -580,7 +580,7 @@ export class ActorModel extends Model<Partial<AttributesOnly<ActorModel>>> { | |||
580 | 580 | ||
581 | if (this.bannerId) { | 581 | if (this.bannerId) { |
582 | const banner = (this as MActorAPChannel).Banner | 582 | const banner = (this as MActorAPChannel).Banner |
583 | const extension = extname(banner.filename) | 583 | const extension = getLowercaseExtension(banner.filename) |
584 | 584 | ||
585 | image = { | 585 | image = { |
586 | type: 'Image', | 586 | type: 'Image', |