import * as Bull from 'bull'
import { move, remove, stat } from 'fs-extra'
-import { extname } from 'path'
+import { getLowercaseExtension } from '@server/helpers/core-utils'
import { retryTransactionWrapper } from '@server/helpers/database-utils'
import { YoutubeDL } from '@server/helpers/youtube-dl'
import { isPostImportVideoAccepted } from '@server/lib/moderation'
const duration = await getDurationFromVideoFile(tempVideoPath)
// Prepare video file object for creation in database
- const fileExt = extname(tempVideoPath)
+ const fileExt = getLowercaseExtension(tempVideoPath)
const videoFileData = {
extname: fileExt,
resolution: videoFileResolution,