mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Fix video upload with a capitalized ext
This commit is contained in:
parent
2951065162
commit
ea54cd04c1
10 changed files with 82 additions and 49 deletions
|
@ -1,5 +1,5 @@
|
|||
import { extname } from 'path'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
import { getLowercaseExtension } from '@server/helpers/core-utils'
|
||||
import { isActivityPubUrlValid } from '@server/helpers/custom-validators/activitypub/misc'
|
||||
import { MIMETYPES } from '@server/initializers/constants'
|
||||
import { ActorModel } from '@server/models/actor/actor'
|
||||
|
@ -43,7 +43,7 @@ function getImageInfoFromObject (actorObject: ActivityPubActor, type: ActorImage
|
|||
if (icon.mediaType) {
|
||||
extension = mimetypes.MIMETYPE_EXT[icon.mediaType]
|
||||
} else {
|
||||
const tmp = extname(icon.url)
|
||||
const tmp = getLowercaseExtension(icon.url)
|
||||
|
||||
if (mimetypes.EXT_MIMETYPE[tmp] !== undefined) extension = tmp
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue