X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Fchecker-after-init.ts;h=14ed82cb4e0b900444198a7a91071be647aae9e8;hb=7b97127e8ba718d673b8a43afa964d136723e6a2;hp=247bc2ad55a996cf1314b443eb140457ea4a723d;hpb=e364e31e25bd1d4b8d801c845a96d6be708f0a18;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts index 247bc2ad5..14ed82cb4 100644 --- a/server/initializers/checker-after-init.ts +++ b/server/initializers/checker-after-init.ts @@ -4,7 +4,7 @@ import { getFFmpegVersion } from '@server/helpers/ffmpeg' import { uniqify } from '@shared/core-utils' import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type' import { RecentlyAddedStrategy } from '../../shared/models/redundancy' -import { isProdInstance, parseSemVersion } from '../helpers/core-utils' +import { isProdInstance, parseBytes, parseSemVersion } from '../helpers/core-utils' import { isArray } from '../helpers/custom-validators/misc' import { logger } from '../helpers/logger' import { ApplicationModel, getServerActor } from '../models/application/application' @@ -251,7 +251,7 @@ function checkLiveConfig () { if (CONFIG.LIVE.RTMPS.ENABLED) { if (!CONFIG.LIVE.RTMPS.KEY_FILE) { - throw new Error('You must specify a key file to enabled RTMPS') + throw new Error('You must specify a key file to enable RTMPS') } if (!CONFIG.LIVE.RTMPS.CERT_FILE) { @@ -284,6 +284,11 @@ function checkObjectStorageConfig () { 'Object storage bucket prefixes should be set to different values when the same bucket is used for both types of video.' ) } + + if (CONFIG.OBJECT_STORAGE.MAX_UPLOAD_PART > parseBytes('250MB')) { + // eslint-disable-next-line max-len + logger.warn(`Object storage max upload part seems to have a big value (${CONFIG.OBJECT_STORAGE.MAX_UPLOAD_PART} bytes). Consider using a lower one (like 100MB).`) + } } }