diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2022-03-16 10:57:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 10:57:36 +0100 |
commit | 60233e90d280eb865d396b30b63c0e88d13ca7db (patch) | |
tree | c30f4abf34d014d647354f9c942fc16f071c0ddb /server | |
parent | ff6a266e3f5cb740770a2a186bdfdd0cb871e174 (diff) | |
download | PeerTube-60233e90d280eb865d396b30b63c0e88d13ca7db.tar.gz PeerTube-60233e90d280eb865d396b30b63c0e88d13ca7db.tar.zst PeerTube-60233e90d280eb865d396b30b63c0e88d13ca7db.zip |
add client.videos.upload.maxChunkSize config (#4857)
* add client.videos.upload.maxChunkSize config
* updates after review
* remove maxChunkSize from custom-config
Diffstat (limited to 'server')
-rw-r--r-- | server/initializers/config.ts | 3 | ||||
-rw-r--r-- | server/lib/server-config-manager.ts | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 6dcca9b67..3aadd9cbd 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts | |||
@@ -64,6 +64,9 @@ const CONFIG = { | |||
64 | MINIATURE: { | 64 | MINIATURE: { |
65 | get PREFER_AUTHOR_DISPLAY_NAME () { return config.get<boolean>('client.videos.miniature.prefer_author_display_name') }, | 65 | get PREFER_AUTHOR_DISPLAY_NAME () { return config.get<boolean>('client.videos.miniature.prefer_author_display_name') }, |
66 | get DISPLAY_AUTHOR_AVATAR () { return config.get<boolean>('client.videos.miniature.display_author_avatar') } | 66 | get DISPLAY_AUTHOR_AVATAR () { return config.get<boolean>('client.videos.miniature.display_author_avatar') } |
67 | }, | ||
68 | RESUMABLE_UPLOAD: { | ||
69 | get MAX_CHUNK_SIZE () { return parseBytes(config.get<number>('client.videos.resumable_upload.max_chunk_size') || 0) } | ||
67 | } | 70 | } |
68 | }, | 71 | }, |
69 | MENU: { | 72 | MENU: { |
diff --git a/server/lib/server-config-manager.ts b/server/lib/server-config-manager.ts index 744186cfc..b920b73d5 100644 --- a/server/lib/server-config-manager.ts +++ b/server/lib/server-config-manager.ts | |||
@@ -48,6 +48,9 @@ class ServerConfigManager { | |||
48 | miniature: { | 48 | miniature: { |
49 | displayAuthorAvatar: CONFIG.CLIENT.VIDEOS.MINIATURE.DISPLAY_AUTHOR_AVATAR, | 49 | displayAuthorAvatar: CONFIG.CLIENT.VIDEOS.MINIATURE.DISPLAY_AUTHOR_AVATAR, |
50 | preferAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.PREFER_AUTHOR_DISPLAY_NAME | 50 | preferAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.PREFER_AUTHOR_DISPLAY_NAME |
51 | }, | ||
52 | resumableUpload: { | ||
53 | maxChunkSize: CONFIG.CLIENT.VIDEOS.RESUMABLE_UPLOAD.MAX_CHUNK_SIZE | ||
51 | } | 54 | } |
52 | }, | 55 | }, |
53 | menu: { | 56 | menu: { |