]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/lib/uploadx.ts
Translated using Weblate (Japanese)
[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(),
7 // Could be big with thumbnails/previews
2f0a0ae2
C
8 maxMetadataSize: '10MB',
9 userIdentifier: (_, res: express.Response) => {
10 if (!res.locals.oauth) return undefined
11
12 return res.locals.oauth.token.user.id + ''
13 }
293074ae 14})
6d472b40
C
15
16export {
17 uploadx
18}