aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-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)