aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/checker-after-init.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-01-19 14:08:05 +0100
committerChocobozzz <me@florianbigard.com>2023-01-19 14:08:05 +0100
commit1f6dd0084485e10623aeb222f1429edf30e5f823 (patch)
treecc3f919352ecc725d35709f6b38ea82d6ed26eaa /server/initializers/checker-after-init.ts
parentf959b51824c4f2ca090241fe91b4ca22de413945 (diff)
downloadPeerTube-1f6dd0084485e10623aeb222f1429edf30e5f823.tar.gz
PeerTube-1f6dd0084485e10623aeb222f1429edf30e5f823.tar.zst
PeerTube-1f6dd0084485e10623aeb222f1429edf30e5f823.zip
Warn on too big max upload part
Diffstat (limited to 'server/initializers/checker-after-init.ts')
-rw-r--r--server/initializers/checker-after-init.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts
index 247bc2ad5..0df7414be 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'
4import { uniqify } from '@shared/core-utils' 4import { uniqify } from '@shared/core-utils'
5import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type' 5import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type'
6import { RecentlyAddedStrategy } from '../../shared/models/redundancy' 6import { RecentlyAddedStrategy } from '../../shared/models/redundancy'
7import { isProdInstance, parseSemVersion } from '../helpers/core-utils' 7import { isProdInstance, parseBytes, parseSemVersion } from '../helpers/core-utils'
8import { isArray } from '../helpers/custom-validators/misc' 8import { isArray } from '../helpers/custom-validators/misc'
9import { logger } from '../helpers/logger' 9import { logger } from '../helpers/logger'
10import { ApplicationModel, getServerActor } from '../models/application/application' 10import { ApplicationModel, getServerActor } from '../models/application/application'
@@ -284,6 +284,11 @@ function checkObjectStorageConfig () {
284 'Object storage bucket prefixes should be set to different values when the same bucket is used for both types of video.' 284 'Object storage bucket prefixes should be set to different values when the same bucket is used for both types of video.'
285 ) 285 )
286 } 286 }
287
288 if (CONFIG.OBJECT_STORAGE.MAX_UPLOAD_PART > parseBytes('250MB')) {
289 // eslint-disable-next-line max-len
290 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).`)
291 }
287 } 292 }
288} 293}
289 294