aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/express-utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-06 11:45:24 +0200
committerChocobozzz <me@florianbigard.com>2018-08-06 11:45:24 +0200
commit2769e297ca6703f761f9b57792585eb1fc5aac49 (patch)
tree02969989eb6f19a3f4ca8d75b882199662fe00e1 /server/helpers/express-utils.ts
parent9484e1f6fcc9cbc118b01579acd1fd6d49bfce2e (diff)
downloadPeerTube-2769e297ca6703f761f9b57792585eb1fc5aac49.tar.gz
PeerTube-2769e297ca6703f761f9b57792585eb1fc5aac49.tar.zst
PeerTube-2769e297ca6703f761f9b57792585eb1fc5aac49.zip
Fix caption upload on Mac OS
Diffstat (limited to 'server/helpers/express-utils.ts')
-rw-r--r--server/helpers/express-utils.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/express-utils.ts b/server/helpers/express-utils.ts
index f136a4329..b3cc40848 100644
--- a/server/helpers/express-utils.ts
+++ b/server/helpers/express-utils.ts
@@ -4,6 +4,7 @@ import { CONFIG, REMOTE_SCHEME } from '../initializers'
4import { logger } from './logger' 4import { logger } from './logger'
5import { User } from '../../shared/models/users' 5import { User } from '../../shared/models/users'
6import { generateRandomString } from './utils' 6import { generateRandomString } from './utils'
7import { extname } from 'path'
7 8
8function buildNSFWFilter (res: express.Response, paramNSFW?: string) { 9function buildNSFWFilter (res: express.Response, paramNSFW?: string) {
9 if (paramNSFW === 'true') return true 10 if (paramNSFW === 'true') return true
@@ -50,7 +51,7 @@ function createReqFiles (
50 }, 51 },
51 52
52 filename: async (req, file, cb) => { 53 filename: async (req, file, cb) => {
53 const extension = mimeTypes[ file.mimetype ] 54 const extension = mimeTypes[ file.mimetype ] || extname(file.originalname)
54 let randomString = '' 55 let randomString = ''
55 56
56 try { 57 try {