diff options
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r-- | server/controllers/api/videos/upload.ts | 4 |
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 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { move } from 'fs-extra' | 2 | import { move } from 'fs-extra' |
3 | import { extname } from 'path' | 3 | import { getLowercaseExtension } from '@server/helpers/core-utils' |
4 | import { deleteResumableUploadMetaFile, getResumableUploadPath } from '@server/helpers/upload' | 4 | import { deleteResumableUploadMetaFile, getResumableUploadPath } from '@server/helpers/upload' |
5 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' | 5 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' |
6 | import { getLocalVideoActivityPubUrl } from '@server/lib/activitypub/url' | 6 | import { getLocalVideoActivityPubUrl } from '@server/lib/activitypub/url' |
@@ -225,7 +225,7 @@ async function addVideo (options: { | |||
225 | 225 | ||
226 | async function buildNewFile (video: MVideo, videoPhysicalFile: express.VideoUploadFile) { | 226 | async 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) |