Skip to content

Commit

Permalink
@uppy/companion: add connection keep-alive to dropbox (transloadit#4365)
Browse files Browse the repository at this point in the history
* add connection: keep-alive to dropbox

fixes transloadit#4357

* update a todo

* dont clear screen by vite

i want to also see companion's output
  • Loading branch information
mifi authored Mar 20, 2023
1 parent 3361e0b commit 011fdd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/server/provider/dropbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class DropBox extends Provider {
prefixUrl: 'https://content.dropboxapi.com/2',
headers: {
'Dropbox-API-Arg': httpHeaderSafeJson({ path: String(id) }),
Connection: 'keep-alive', // important because https://github.com/transloadit/uppy/issues/4357
},
body: Buffer.alloc(0), // if not, it will hang waiting for the writable stream
responseType: 'json',
Expand Down
2 changes: 1 addition & 1 deletion src/standalone/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ module.exports = function server (inputCompanionOptions) {
if (companionOptions.redisUrl) {
const RedisStore = connectRedis(session)
const redisClient = redis.client(companionOptions)
// todo next major: change default prefix to something like "companion:" and possibly remove this option
// todo next major: change default prefix to something like "companion-session:" and possibly remove this option
sessionOptions.store = new RedisStore({ client: redisClient, prefix: process.env.COMPANION_REDIS_EXPRESS_SESSION_PREFIX || 'sess:' })
}

Expand Down

0 comments on commit 011fdd5

Please sign in to comment.