diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-08 09:33:03 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-08 10:01:50 +0200 |
commit | ea54cd04c1ff0e55651cd5fb1a83672acde68604 (patch) | |
tree | 4e10fea658e72a9f79375d0e9b23d08915d3d0b2 /server/controllers/api | |
parent | 295106516277581ba4967199fa5580264a90ae2c (diff) | |
download | PeerTube-ea54cd04c1ff0e55651cd5fb1a83672acde68604.tar.gz PeerTube-ea54cd04c1ff0e55651cd5fb1a83672acde68604.tar.zst PeerTube-ea54cd04c1ff0e55651cd5fb1a83672acde68604.zip |
Fix video upload with a capitalized ext
Diffstat (limited to 'server/controllers/api')
-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) |