mirror of https://github.com/Chocobozzz/PeerTube
add client.videos.upload.maxChunkSize config (#4857)
* add client.videos.upload.maxChunkSize config * updates after review * remove maxChunkSize from custom-configpull/4867/head
parent
ff6a266e3f
commit
60233e90d2
|
@ -282,7 +282,8 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
|
||||||
|
|
||||||
this.resumableUploadService.handleFiles(file, {
|
this.resumableUploadService.handleFiles(file, {
|
||||||
...this.uploadxOptions,
|
...this.uploadxOptions,
|
||||||
metadata
|
metadata,
|
||||||
|
maxChunkSize: this.serverConfig.client.videos.resumableUpload.maxChunkSize
|
||||||
})
|
})
|
||||||
|
|
||||||
this.isUploadingVideo = true
|
this.isUploadingVideo = true
|
||||||
|
|
|
@ -631,6 +631,10 @@ client:
|
||||||
# By default PeerTube client displays author username
|
# By default PeerTube client displays author username
|
||||||
prefer_author_display_name: false
|
prefer_author_display_name: false
|
||||||
display_author_avatar: false
|
display_author_avatar: false
|
||||||
|
resumable_upload:
|
||||||
|
# Max size of upload chunks, e.g. '90MB'
|
||||||
|
# If null, it will be calculated based on network speed
|
||||||
|
max_chunk_size: null
|
||||||
|
|
||||||
menu:
|
menu:
|
||||||
login:
|
login:
|
||||||
|
|
|
@ -639,6 +639,10 @@ client:
|
||||||
# By default PeerTube client displays author username
|
# By default PeerTube client displays author username
|
||||||
prefer_author_display_name: false
|
prefer_author_display_name: false
|
||||||
display_author_avatar: false
|
display_author_avatar: false
|
||||||
|
resumable_upload:
|
||||||
|
# Max size of upload chunks, e.g. '90MB'
|
||||||
|
# If null, it will be calculated based on network speed
|
||||||
|
max_chunk_size: null
|
||||||
|
|
||||||
menu:
|
menu:
|
||||||
login:
|
login:
|
||||||
|
|
|
@ -64,6 +64,9 @@ const CONFIG = {
|
||||||
MINIATURE: {
|
MINIATURE: {
|
||||||
get PREFER_AUTHOR_DISPLAY_NAME () { return config.get<boolean>('client.videos.miniature.prefer_author_display_name') },
|
get PREFER_AUTHOR_DISPLAY_NAME () { return config.get<boolean>('client.videos.miniature.prefer_author_display_name') },
|
||||||
get DISPLAY_AUTHOR_AVATAR () { return config.get<boolean>('client.videos.miniature.display_author_avatar') }
|
get DISPLAY_AUTHOR_AVATAR () { return config.get<boolean>('client.videos.miniature.display_author_avatar') }
|
||||||
|
},
|
||||||
|
RESUMABLE_UPLOAD: {
|
||||||
|
get MAX_CHUNK_SIZE () { return parseBytes(config.get<number>('client.videos.resumable_upload.max_chunk_size') || 0) }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
MENU: {
|
MENU: {
|
||||||
|
|
|
@ -48,6 +48,9 @@ class ServerConfigManager {
|
||||||
miniature: {
|
miniature: {
|
||||||
displayAuthorAvatar: CONFIG.CLIENT.VIDEOS.MINIATURE.DISPLAY_AUTHOR_AVATAR,
|
displayAuthorAvatar: CONFIG.CLIENT.VIDEOS.MINIATURE.DISPLAY_AUTHOR_AVATAR,
|
||||||
preferAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.PREFER_AUTHOR_DISPLAY_NAME
|
preferAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.PREFER_AUTHOR_DISPLAY_NAME
|
||||||
|
},
|
||||||
|
resumableUpload: {
|
||||||
|
maxChunkSize: CONFIG.CLIENT.VIDEOS.RESUMABLE_UPLOAD.MAX_CHUNK_SIZE
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
menu: {
|
menu: {
|
||||||
|
|
|
@ -41,6 +41,9 @@ export interface ServerConfig {
|
||||||
displayAuthorAvatar: boolean
|
displayAuthorAvatar: boolean
|
||||||
preferAuthorDisplayName: boolean
|
preferAuthorDisplayName: boolean
|
||||||
}
|
}
|
||||||
|
resumableUpload: {
|
||||||
|
maxChunkSize: number
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
menu: {
|
menu: {
|
||||||
|
|
Loading…
Reference in New Issue