]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/lib/uploadx.ts
Fix 2 hours limit on uploads
[github/Chocobozzz/PeerTube.git] / server / lib / uploadx.ts
CommitLineData
6d472b40
C
1import express from 'express'
2import { getResumableUploadPath } from '@server/helpers/upload'
3import { Uploadx } from '@uploadx/core'
4
293074ae
C
5const uploadx = new Uploadx({
6 directory: getResumableUploadPath(),
77d0ae7b
C
7
8 expiration: { maxAge: undefined, rolling: true },
9
293074ae 10 // Could be big with thumbnails/previews
2f0a0ae2 11 maxMetadataSize: '10MB',
77d0ae7b 12
2f0a0ae2
C
13 userIdentifier: (_, res: express.Response) => {
14 if (!res.locals.oauth) return undefined
15
16 return res.locals.oauth.token.user.id + ''
17 }
293074ae 18})
6d472b40
C
19
20export {
21 uploadx
22}