diff options
author | Chocobozzz <me@florianbigard.com> | 2023-04-21 14:55:10 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2023-05-09 08:57:34 +0200 |
commit | 0c9668f77901e7540e2c7045eb0f2974a4842a69 (patch) | |
tree | 226d3dd1565b0bb56588897af3b8530e6216e96b /server/lib/uploadx.ts | |
parent | 6bcb854cdea8688a32240bc5719c7d139806e00b (diff) | |
download | PeerTube-0c9668f77901e7540e2c7045eb0f2974a4842a69.tar.gz PeerTube-0c9668f77901e7540e2c7045eb0f2974a4842a69.tar.zst PeerTube-0c9668f77901e7540e2c7045eb0f2974a4842a69.zip |
Implement remote runner jobs in server
Move ffmpeg functions to @shared
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 { |