aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/uploadx.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/uploadx.ts')
-rw-r--r--server/lib/uploadx.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/lib/uploadx.ts b/server/lib/uploadx.ts
new file mode 100644
index 000000000..11b1044db
--- /dev/null
+++ b/server/lib/uploadx.ts
@@ -0,0 +1,10 @@
1import express from 'express'
2import { getResumableUploadPath } from '@server/helpers/upload'
3import { Uploadx } from '@uploadx/core'
4
5const uploadx = new Uploadx({ directory: getResumableUploadPath() })
6uploadx.getUserId = (_, res: express.Response) => res.locals.oauth?.token.user.id
7
8export {
9 uploadx
10}