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.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/lib/uploadx.ts b/server/lib/uploadx.ts
index 36f5a556c..34a4461f0 100644
--- a/server/lib/uploadx.ts
+++ b/server/lib/uploadx.ts
@@ -5,9 +5,13 @@ import { Uploadx } from '@uploadx/core'
5const uploadx = new Uploadx({ 5const uploadx = new Uploadx({
6 directory: getResumableUploadPath(), 6 directory: getResumableUploadPath(),
7 // Could be big with thumbnails/previews 7 // Could be big with thumbnails/previews
8 maxMetadataSize: '10MB' 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 }
9}) 14})
10uploadx.getUserId = (_, res: express.Response) => res.locals.oauth?.token.user.id
11 15
12export { 16export {
13 uploadx 17 uploadx