diff options
Diffstat (limited to 'server/lib/uploadx.ts')
-rw-r--r-- | server/lib/uploadx.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/lib/uploadx.ts b/server/lib/uploadx.ts index 58040cb6d..c7e0eb414 100644 --- a/server/lib/uploadx.ts +++ b/server/lib/uploadx.ts | |||
@@ -3,6 +3,7 @@ import { buildLogger } from '@server/helpers/logger' | |||
3 | import { getResumableUploadPath } from '@server/helpers/upload' | 3 | import { getResumableUploadPath } from '@server/helpers/upload' |
4 | import { CONFIG } from '@server/initializers/config' | 4 | import { CONFIG } from '@server/initializers/config' |
5 | import { LogLevel, Uploadx } from '@uploadx/core' | 5 | import { LogLevel, Uploadx } from '@uploadx/core' |
6 | import { extname } from 'path' | ||
6 | 7 | ||
7 | const logger = buildLogger('uploadx') | 8 | const logger = buildLogger('uploadx') |
8 | 9 | ||
@@ -26,7 +27,9 @@ const uploadx = new Uploadx({ | |||
26 | if (!res.locals.oauth) return undefined | 27 | if (!res.locals.oauth) return undefined |
27 | 28 | ||
28 | return res.locals.oauth.token.user.id + '' | 29 | return res.locals.oauth.token.user.id + '' |
29 | } | 30 | }, |
31 | |||
32 | filename: file => `${file.userId}-${file.id}${extname(file.metadata.filename)}` | ||
30 | }) | 33 | }) |
31 | 34 | ||
32 | export { | 35 | export { |