]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/lib/uploadx.ts
Refactor plugin card
[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
8 maxMetadataSize: '10MB'
9})
6d472b40
C
10uploadx.getUserId = (_, res: express.Response) => res.locals.oauth?.token.user.id
11
12export {
13 uploadx
14}