aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-08 09:33:03 +0200
committerChocobozzz <me@florianbigard.com>2021-06-08 10:01:50 +0200
commitea54cd04c1ff0e55651cd5fb1a83672acde68604 (patch)
tree4e10fea658e72a9f79375d0e9b23d08915d3d0b2 /server/lib/activitypub
parent295106516277581ba4967199fa5580264a90ae2c (diff)
downloadPeerTube-ea54cd04c1ff0e55651cd5fb1a83672acde68604.tar.gz
PeerTube-ea54cd04c1ff0e55651cd5fb1a83672acde68604.tar.zst
PeerTube-ea54cd04c1ff0e55651cd5fb1a83672acde68604.zip
Fix video upload with a capitalized ext
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/actors/shared/object-to-model-attributes.ts4
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 @@
1import { extname } from 'path'
2import { v4 as uuidv4 } from 'uuid' 1import { v4 as uuidv4 } from 'uuid'
2import { getLowercaseExtension } from '@server/helpers/core-utils'
3import { isActivityPubUrlValid } from '@server/helpers/custom-validators/activitypub/misc' 3import { isActivityPubUrlValid } from '@server/helpers/custom-validators/activitypub/misc'
4import { MIMETYPES } from '@server/initializers/constants' 4import { MIMETYPES } from '@server/initializers/constants'
5import { ActorModel } from '@server/models/actor/actor' 5import { 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 }