mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Fix caption upload on Mac OS
This commit is contained in:
parent
9484e1f6fc
commit
2769e297ca
7 changed files with 49 additions and 10 deletions
|
@ -4,6 +4,7 @@ import { CONFIG, REMOTE_SCHEME } from '../initializers'
|
|||
import { logger } from './logger'
|
||||
import { User } from '../../shared/models/users'
|
||||
import { generateRandomString } from './utils'
|
||||
import { extname } from 'path'
|
||||
|
||||
function buildNSFWFilter (res: express.Response, paramNSFW?: string) {
|
||||
if (paramNSFW === 'true') return true
|
||||
|
@ -50,7 +51,7 @@ function createReqFiles (
|
|||
},
|
||||
|
||||
filename: async (req, file, cb) => {
|
||||
const extension = mimeTypes[ file.mimetype ]
|
||||
const extension = mimeTypes[ file.mimetype ] || extname(file.originalname)
|
||||
let randomString = ''
|
||||
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue