aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos
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/controllers/api/videos
parent295106516277581ba4967199fa5580264a90ae2c (diff)
downloadPeerTube-ea54cd04c1ff0e55651cd5fb1a83672acde68604.tar.gz
PeerTube-ea54cd04c1ff0e55651cd5fb1a83672acde68604.tar.zst
PeerTube-ea54cd04c1ff0e55651cd5fb1a83672acde68604.zip
Fix video upload with a capitalized ext
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r--server/controllers/api/videos/upload.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/videos/upload.ts b/server/controllers/api/videos/upload.ts
index 783cc329a..e767492bc 100644
--- a/server/controllers/api/videos/upload.ts
+++ b/server/controllers/api/videos/upload.ts
@@ -1,6 +1,6 @@
1import * as express from 'express' 1import * as express from 'express'
2import { move } from 'fs-extra' 2import { move } from 'fs-extra'
3import { extname } from 'path' 3import { getLowercaseExtension } from '@server/helpers/core-utils'
4import { deleteResumableUploadMetaFile, getResumableUploadPath } from '@server/helpers/upload' 4import { deleteResumableUploadMetaFile, getResumableUploadPath } from '@server/helpers/upload'
5import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' 5import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'
6import { getLocalVideoActivityPubUrl } from '@server/lib/activitypub/url' 6import { getLocalVideoActivityPubUrl } from '@server/lib/activitypub/url'
@@ -225,7 +225,7 @@ async function addVideo (options: {
225 225
226async function buildNewFile (video: MVideo, videoPhysicalFile: express.VideoUploadFile) { 226async function buildNewFile (video: MVideo, videoPhysicalFile: express.VideoUploadFile) {
227 const videoFile = new VideoFileModel({ 227 const videoFile = new VideoFileModel({
228 extname: extname(videoPhysicalFile.filename), 228 extname: getLowercaseExtension(videoPhysicalFile.filename),
229 size: videoPhysicalFile.size, 229 size: videoPhysicalFile.size,
230 videoStreamingPlaylistId: null, 230 videoStreamingPlaylistId: null,
231 metadata: await getMetadataFromFile(videoPhysicalFile.path) 231 metadata: await getMetadataFromFile(videoPhysicalFile.path)