Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@uppy/companion: add connection keep-alive to dropbox #4365

Merged
merged 3 commits into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only want this for Dropbox? No other providers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropbox is the one with the problem. i thought it's safer not to change it for more providers than we need to.
see discussion here: #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 packages/@uppy/companion/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
2 changes: 1 addition & 1 deletion private/dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"dev": "vite --clearScreen false",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this unrelated change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just because i don't want to make a seaparate pr for it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And why do we want this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see commit d63a5aa

"build": "vite build",
"preview": "vite preview"
}
Expand Down