From b21ef8aec3d9c323f665906f326ca20516dcbeca Mon Sep 17 00:00:00 2001 From: Subha Sarkar Date: Wed, 2 Aug 2023 12:15:42 +0530 Subject: [PATCH 1/3] FIX: redis deafult expeiry --- packages/@uppy/companion/src/server/Uploader.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/@uppy/companion/src/server/Uploader.js b/packages/@uppy/companion/src/server/Uploader.js index 19b9345dc7..64d3dae4b5 100644 --- a/packages/@uppy/companion/src/server/Uploader.js +++ b/packages/@uppy/companion/src/server/Uploader.js @@ -411,7 +411,10 @@ class Uploader { // https://github.com/transloadit/uppy/issues/3748 const keyExpirySec = 60 * 60 * 24 const redisKey = `${Uploader.STORAGE_PREFIX}:${this.token}` - this.storage.set(redisKey, jsonStringify(state), 'EX', keyExpirySec) + // this.storage.set(redisKey, jsonStringify(state), 'EX', keyExpirySec) + this.storage.set(redisKey, jsonStringify(state), { + EX: keyExpirySec, + }) } throttledEmitProgress = throttle((dataToEmit) => { From 5c7cefcf6aa41084ce1fa34df2dc594a78ceb189 Mon Sep 17 00:00:00 2001 From: Subha Sarkar Date: Wed, 2 Aug 2023 13:10:19 +0530 Subject: [PATCH 2/3] removed commented code --- packages/@uppy/companion/src/server/Uploader.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/@uppy/companion/src/server/Uploader.js b/packages/@uppy/companion/src/server/Uploader.js index 64d3dae4b5..06b310ffc1 100644 --- a/packages/@uppy/companion/src/server/Uploader.js +++ b/packages/@uppy/companion/src/server/Uploader.js @@ -411,7 +411,6 @@ class Uploader { // https://github.com/transloadit/uppy/issues/3748 const keyExpirySec = 60 * 60 * 24 const redisKey = `${Uploader.STORAGE_PREFIX}:${this.token}` - // this.storage.set(redisKey, jsonStringify(state), 'EX', keyExpirySec) this.storage.set(redisKey, jsonStringify(state), { EX: keyExpirySec, }) From 4b7fe91301c4b7b92b5c7e0cecd5b755b68eeed7 Mon Sep 17 00:00:00 2001 From: Subha Sarkar Date: Wed, 2 Aug 2023 21:14:41 +0530 Subject: [PATCH 3/3] fix indentation error --- packages/@uppy/companion/src/server/Uploader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@uppy/companion/src/server/Uploader.js b/packages/@uppy/companion/src/server/Uploader.js index 06b310ffc1..04d67b3603 100644 --- a/packages/@uppy/companion/src/server/Uploader.js +++ b/packages/@uppy/companion/src/server/Uploader.js @@ -412,7 +412,7 @@ class Uploader { const keyExpirySec = 60 * 60 * 24 const redisKey = `${Uploader.STORAGE_PREFIX}:${this.token}` this.storage.set(redisKey, jsonStringify(state), { - EX: keyExpirySec, + EX: keyExpirySec, }) }