diff options
author | Chocobozzz <me@florianbigard.com> | 2023-01-19 14:08:05 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-01-19 14:08:05 +0100 |
commit | 1f6dd0084485e10623aeb222f1429edf30e5f823 (patch) | |
tree | cc3f919352ecc725d35709f6b38ea82d6ed26eaa /server | |
parent | f959b51824c4f2ca090241fe91b4ca22de413945 (diff) | |
download | PeerTube-1f6dd0084485e10623aeb222f1429edf30e5f823.tar.gz PeerTube-1f6dd0084485e10623aeb222f1429edf30e5f823.tar.zst PeerTube-1f6dd0084485e10623aeb222f1429edf30e5f823.zip |
Warn on too big max upload part
Diffstat (limited to 'server')
-rw-r--r-- | server/initializers/checker-after-init.ts | 7 |
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' | |||
4 | import { uniqify } from '@shared/core-utils' | 4 | import { uniqify } from '@shared/core-utils' |
5 | import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type' | 5 | import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type' |
6 | import { RecentlyAddedStrategy } from '../../shared/models/redundancy' | 6 | import { RecentlyAddedStrategy } from '../../shared/models/redundancy' |
7 | import { isProdInstance, parseSemVersion } from '../helpers/core-utils' | 7 | import { isProdInstance, parseBytes, parseSemVersion } from '../helpers/core-utils' |
8 | import { isArray } from '../helpers/custom-validators/misc' | 8 | import { isArray } from '../helpers/custom-validators/misc' |
9 | import { logger } from '../helpers/logger' | 9 | import { logger } from '../helpers/logger' |
10 | import { ApplicationModel, getServerActor } from '../models/application/application' | 10 | import { 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 | ||