diff options
-rw-r--r-- | client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts | 3 | ||||
-rw-r--r-- | config/default.yaml | 4 | ||||
-rw-r--r-- | config/production.yaml.example | 4 | ||||
-rw-r--r-- | server/initializers/config.ts | 3 | ||||
-rw-r--r-- | server/lib/server-config-manager.ts | 3 | ||||
-rw-r--r-- | shared/models/server/server-config.model.ts | 3 |
6 files changed, 19 insertions, 1 deletions
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts index 5655e48da..c4438d777 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts | |||
@@ -282,7 +282,8 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy | |||
282 | 282 | ||
283 | this.resumableUploadService.handleFiles(file, { | 283 | this.resumableUploadService.handleFiles(file, { |
284 | ...this.uploadxOptions, | 284 | ...this.uploadxOptions, |
285 | metadata | 285 | metadata, |
286 | maxChunkSize: this.serverConfig.client.videos.resumableUpload.maxChunkSize | ||
286 | }) | 287 | }) |
287 | 288 | ||
288 | this.isUploadingVideo = true | 289 | this.isUploadingVideo = true |
diff --git a/config/default.yaml b/config/default.yaml index 898395705..42ce12c18 100644 --- a/config/default.yaml +++ b/config/default.yaml | |||
@@ -631,6 +631,10 @@ client: | |||
631 | # By default PeerTube client displays author username | 631 | # By default PeerTube client displays author username |
632 | prefer_author_display_name: false | 632 | prefer_author_display_name: false |
633 | display_author_avatar: false | 633 | display_author_avatar: false |
634 | resumable_upload: | ||
635 | # Max size of upload chunks, e.g. '90MB' | ||
636 | # If null, it will be calculated based on network speed | ||
637 | max_chunk_size: null | ||
634 | 638 | ||
635 | menu: | 639 | menu: |
636 | login: | 640 | login: |
diff --git a/config/production.yaml.example b/config/production.yaml.example index 03afe5841..bb1b4615b 100644 --- a/config/production.yaml.example +++ b/config/production.yaml.example | |||
@@ -639,6 +639,10 @@ client: | |||
639 | # By default PeerTube client displays author username | 639 | # By default PeerTube client displays author username |
640 | prefer_author_display_name: false | 640 | prefer_author_display_name: false |
641 | display_author_avatar: false | 641 | display_author_avatar: false |
642 | resumable_upload: | ||
643 | # Max size of upload chunks, e.g. '90MB' | ||
644 | # If null, it will be calculated based on network speed | ||
645 | max_chunk_size: null | ||
642 | 646 | ||
643 | menu: | 647 | menu: |
644 | login: | 648 | login: |
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: { |
diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts index d7fbed13c..146bed24b 100644 --- a/shared/models/server/server-config.model.ts +++ b/shared/models/server/server-config.model.ts | |||
@@ -41,6 +41,9 @@ export interface ServerConfig { | |||
41 | displayAuthorAvatar: boolean | 41 | displayAuthorAvatar: boolean |
42 | preferAuthorDisplayName: boolean | 42 | preferAuthorDisplayName: boolean |
43 | } | 43 | } |
44 | resumableUpload: { | ||
45 | maxChunkSize: number | ||
46 | } | ||
44 | } | 47 | } |
45 | 48 | ||
46 | menu: { | 49 | menu: { |