diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-22 14:28:03 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-07-26 11:29:31 +0200 |
commit | 83903cb65d531a6b6b91715387493ba8312b264d (patch) | |
tree | fd172e26a483331e74f15a062743a9d40d4016d3 /server/controllers/api/videos/upload.ts | |
parent | c4fa01f7c45b66b112ebd08abce744b7c4041feb (diff) | |
download | PeerTube-83903cb65d531a6b6b91715387493ba8312b264d.tar.gz PeerTube-83903cb65d531a6b6b91715387493ba8312b264d.tar.zst PeerTube-83903cb65d531a6b6b91715387493ba8312b264d.zip |
Generate random uuid for video files
Diffstat (limited to 'server/controllers/api/videos/upload.ts')
-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 1603ef127..7792ae3fc 100644 --- a/server/controllers/api/videos/upload.ts +++ b/server/controllers/api/videos/upload.ts | |||
@@ -6,7 +6,7 @@ import { uuidToShort } from '@server/helpers/uuid' | |||
6 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' | 6 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' |
7 | import { getLocalVideoActivityPubUrl } from '@server/lib/activitypub/url' | 7 | import { getLocalVideoActivityPubUrl } from '@server/lib/activitypub/url' |
8 | import { addOptimizeOrMergeAudioJob, buildLocalVideoFromReq, buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' | 8 | import { addOptimizeOrMergeAudioJob, buildLocalVideoFromReq, buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' |
9 | import { generateVideoFilename, getVideoFilePath } from '@server/lib/video-paths' | 9 | import { generateWebTorrentVideoFilename, getVideoFilePath } from '@server/lib/video-paths' |
10 | import { openapiOperationDoc } from '@server/middlewares/doc' | 10 | import { openapiOperationDoc } from '@server/middlewares/doc' |
11 | import { MVideo, MVideoFile, MVideoFullLight } from '@server/types/models' | 11 | import { MVideo, MVideoFile, MVideoFullLight } from '@server/types/models' |
12 | import { uploadx } from '@uploadx/core' | 12 | import { uploadx } from '@uploadx/core' |
@@ -240,7 +240,7 @@ async function buildNewFile (video: MVideo, videoPhysicalFile: express.VideoUplo | |||
240 | videoFile.resolution = (await getVideoFileResolution(videoPhysicalFile.path)).videoFileResolution | 240 | videoFile.resolution = (await getVideoFileResolution(videoPhysicalFile.path)).videoFileResolution |
241 | } | 241 | } |
242 | 242 | ||
243 | videoFile.filename = generateVideoFilename(video, false, videoFile.resolution, videoFile.extname) | 243 | videoFile.filename = generateWebTorrentVideoFilename(videoFile.resolution, videoFile.extname) |
244 | 244 | ||
245 | return videoFile | 245 | return videoFile |
246 | } | 246 | } |