]>
Commit | Line | Data |
---|---|---|
6d472b40 C |
1 | import express from 'express' |
2 | import { getResumableUploadPath } from '@server/helpers/upload' | |
3 | import { Uploadx } from '@uploadx/core' | |
4 | ||
293074ae C |
5 | const uploadx = new Uploadx({ |
6 | directory: getResumableUploadPath(), | |
7 | // Could be big with thumbnails/previews | |
8 | maxMetadataSize: '10MB' | |
9 | }) | |
6d472b40 C |
10 | uploadx.getUserId = (_, res: express.Response) => res.locals.oauth?.token.user.id |
11 | ||
12 | export { | |
13 | uploadx | |
14 | } |