]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/lib/uploadx.ts
Convert followers/following in raw SQL queries
[github/Chocobozzz/PeerTube.git] / server / lib / uploadx.ts
1 import express from 'express'
2 import { getResumableUploadPath } from '@server/helpers/upload'
3 import { Uploadx } from '@uploadx/core'
4
5 const uploadx = new Uploadx({
6 directory: getResumableUploadPath(),
7
8 expiration: { maxAge: undefined, rolling: true },
9
10 // Could be big with thumbnails/previews
11 maxMetadataSize: '10MB',
12
13 userIdentifier: (_, res: express.Response) => {
14 if (!res.locals.oauth) return undefined
15
16 return res.locals.oauth.token.user.id + ''
17 }
18 })
19
20 export {
21 uploadx
22 }