1
0
Fork 0
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:
Chocobozzz 2018-08-06 11:45:24 +02:00
parent 9484e1f6fc
commit 2769e297ca
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 49 additions and 10 deletions

View file

@ -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 {