Skip to content

Commit

Permalink
fix: allow disabling tus-s3-tags for better compatibility (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
fenos authored Dec 17, 2024
1 parent 28539d7 commit f45ccaf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ type StorageConfigType = {
tusPath: string
tusPartSize: number
tusUseFileVersionSeparator: boolean
tusAllowS3Tags: boolean
defaultMetricsEnabled: boolean
s3ProtocolEnabled: boolean
s3ProtocolPrefix: string
Expand Down Expand Up @@ -251,6 +252,7 @@ export function getConfig(options?: { reload?: boolean }): StorageConfigType {
),
tusUseFileVersionSeparator:
getOptionalConfigFromEnv('TUS_USE_FILE_VERSION_SEPARATOR') === 'true',
tusAllowS3Tags: getOptionalConfigFromEnv('TUS_ALLOW_S3_TAGS') !== 'false',

// S3 Protocol
s3ProtocolEnabled: getOptionalConfigFromEnv('S3_PROTOCOL_ENABLED') !== 'false',
Expand Down
2 changes: 2 additions & 0 deletions src/http/routes/tus/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const {
tusPath,
tusPartSize,
tusMaxConcurrentUploads,
tusAllowS3Tags,
uploadFileSizeLimit,
storageBackendType,
storageFilePath,
Expand All @@ -66,6 +67,7 @@ function createTusStore(agent: { httpsAgent: https.Agent; httpAgent: http.Agent
expirationPeriodInMilliseconds: tusUrlExpiryMs,
cache: new AlsMemoryKV(),
maxConcurrentPartUploads: tusMaxConcurrentUploads,
useTags: tusAllowS3Tags,
s3ClientConfig: {
requestHandler: new NodeHttpHandler({
...agent,
Expand Down

0 comments on commit f45ccaf

Please sign in to comment.