Skip to content

Commit f45ccaf

Browse files
authored
fix: allow disabling tus-s3-tags for better compatibility (#604)
1 parent 28539d7 commit f45ccaf

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/config.ts

+2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ type StorageConfigType = {
107107
tusPath: string
108108
tusPartSize: number
109109
tusUseFileVersionSeparator: boolean
110+
tusAllowS3Tags: boolean
110111
defaultMetricsEnabled: boolean
111112
s3ProtocolEnabled: boolean
112113
s3ProtocolPrefix: string
@@ -251,6 +252,7 @@ export function getConfig(options?: { reload?: boolean }): StorageConfigType {
251252
),
252253
tusUseFileVersionSeparator:
253254
getOptionalConfigFromEnv('TUS_USE_FILE_VERSION_SEPARATOR') === 'true',
255+
tusAllowS3Tags: getOptionalConfigFromEnv('TUS_ALLOW_S3_TAGS') !== 'false',
254256

255257
// S3 Protocol
256258
s3ProtocolEnabled: getOptionalConfigFromEnv('S3_PROTOCOL_ENABLED') !== 'false',

src/http/routes/tus/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const {
4242
tusPath,
4343
tusPartSize,
4444
tusMaxConcurrentUploads,
45+
tusAllowS3Tags,
4546
uploadFileSizeLimit,
4647
storageBackendType,
4748
storageFilePath,
@@ -66,6 +67,7 @@ function createTusStore(agent: { httpsAgent: https.Agent; httpAgent: http.Agent
6667
expirationPeriodInMilliseconds: tusUrlExpiryMs,
6768
cache: new AlsMemoryKV(),
6869
maxConcurrentPartUploads: tusMaxConcurrentUploads,
70+
useTags: tusAllowS3Tags,
6971
s3ClientConfig: {
7072
requestHandler: new NodeHttpHandler({
7173
...agent,

0 commit comments

Comments
 (0)