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/lib/activitypub/actors/shared/object-to-model-attributes.ts | |
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/lib/activitypub/actors/shared/object-to-model-attributes.ts')
-rw-r--r-- | server/lib/activitypub/actors/shared/object-to-model-attributes.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/activitypub/actors/shared/object-to-model-attributes.ts b/server/lib/activitypub/actors/shared/object-to-model-attributes.ts index 66b22c952..f53b98448 100644 --- a/server/lib/activitypub/actors/shared/object-to-model-attributes.ts +++ b/server/lib/activitypub/actors/shared/object-to-model-attributes.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { extname } from 'path' | ||
2 | import { v4 as uuidv4 } from 'uuid' | 1 | import { v4 as uuidv4 } from 'uuid' |
2 | import { getLowercaseExtension } from '@server/helpers/core-utils' | ||
3 | import { isActivityPubUrlValid } from '@server/helpers/custom-validators/activitypub/misc' | 3 | import { isActivityPubUrlValid } from '@server/helpers/custom-validators/activitypub/misc' |
4 | import { MIMETYPES } from '@server/initializers/constants' | 4 | import { MIMETYPES } from '@server/initializers/constants' |
5 | import { ActorModel } from '@server/models/actor/actor' | 5 | import { ActorModel } from '@server/models/actor/actor' |
@@ -43,7 +43,7 @@ function getImageInfoFromObject (actorObject: ActivityPubActor, type: ActorImage | |||
43 | if (icon.mediaType) { | 43 | if (icon.mediaType) { |
44 | extension = mimetypes.MIMETYPE_EXT[icon.mediaType] | 44 | extension = mimetypes.MIMETYPE_EXT[icon.mediaType] |
45 | } else { | 45 | } else { |
46 | const tmp = extname(icon.url) | 46 | const tmp = getLowercaseExtension(icon.url) |
47 | 47 | ||
48 | if (mimetypes.EXT_MIMETYPE[tmp] !== undefined) extension = tmp | 48 | if (mimetypes.EXT_MIMETYPE[tmp] !== undefined) extension = tmp |
49 | } | 49 | } |