Skip to content

Commit

Permalink
refactor: rename COMPANION_DEFERRED_UPLOAD_LENGTH to COMPANION_TUS_DE…
Browse files Browse the repository at this point in the history
…FERRED_UPLOAD_LENGTH
  • Loading branch information
dschmidt committed Jan 7, 2025
1 parent 25e0cc0 commit 26471e1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/@uppy/companion/KUBERNETES.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ data:
COMPANION_DOMAINS: 'sub1.domain.com,sub2.domain.com,sub3.domain.com'
COMPANION_PROTOCOL: 'YOUR SERVER PROTOCOL'
COMPANION_STREAMING_UPLOAD: true
COMPANION_DEFERRED_UPLOAD_LENGTH: true
COMPANION_TUS_DEFERRED_UPLOAD_LENGTH: true
COMPANION_REDIS_URL: redis://:[email protected]:6379
COMPANION_SECRET: 'shh!Issa Secret!'
COMPANION_PREAUTH_SECRET: 'another secret'
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/companion/env_example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ COMPANION_SELF_ENDPOINT=uppy.xxxx.com
COMPANION_HIDE_METRICS=false
COMPANION_HIDE_WELCOME=false
COMPANION_STREAMING_UPLOAD=true
COMPANION_DEFERRED_UPLOAD_LENGTH=true
COMPANION_TUS_DEFERRED_UPLOAD_LENGTH=true

COMPANION_PROTOCOL=https
COMPANION_DATADIR=/mnt/uppy-server-data
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/companion/src/server/Uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ class Uploader {
},
}

if (this.options.companionOptions.deferredUploadLength && !isFileStream) {
if (this.options.companionOptions.tusDeferredUploadLength && !isFileStream) {
tusOptions.uploadLengthDeferred = true
} else {
tusOptions.uploadLengthDeferred = false
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/companion/src/standalone/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ const getConfigFromEnv = () => {
// cookieDomain is kind of a hack to support distributed systems. This should be improved but we never got so far.
cookieDomain: process.env.COMPANION_COOKIE_DOMAIN,
streamingUpload: process.env.COMPANION_STREAMING_UPLOAD ? process.env.COMPANION_STREAMING_UPLOAD === 'true' : undefined,
deferredUploadLength: process.env.COMPANION_DEFERRED_UPLOAD_LENGTH ? process.env.COMPANION_DEFERRED_UPLOAD_LENGTH === 'true' : true,
tusDeferredUploadLength: process.env.COMPANION_TUS_DEFERRED_UPLOAD_LENGTH ? process.env.COMPANION_TUS_DEFERRED_UPLOAD_LENGTH === 'true' : true,
maxFileSize: process.env.COMPANION_MAX_FILE_SIZE ? parseInt(process.env.COMPANION_MAX_FILE_SIZE, 10) : undefined,
chunkSize: process.env.COMPANION_CHUNK_SIZE ? parseInt(process.env.COMPANION_CHUNK_SIZE, 10) : undefined,
clientSocketConnectTimeout: process.env.COMPANION_CLIENT_SOCKET_CONNECT_TIMEOUT
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/companion/test/mockserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const defaultEnv = {
COMPANION_HIDE_WELCOME: 'false',

COMPANION_STREAMING_UPLOAD: 'true',
COMPANION_DEFERRED_UPLOAD_LENGTH: 'true',
COMPANION_TUS_DEFERRED_UPLOAD_LENGTH: 'true',
COMPANION_ALLOW_LOCAL_URLS: 'false',

COMPANION_PROTOCOL: 'http',
Expand Down

0 comments on commit 26471e1

Please sign in to comment.