Browse Source

fix: PR requested things

pull/6572/head
mertmit 1 year ago
parent
commit
8517a0cc83
  1. 2
      packages/nocodb/src/cache/RedisCacheMgr.ts
  2. 2
      packages/nocodb/src/cache/RedisMockCacheMgr.ts
  3. 6
      packages/nocodb/src/plugins/s3/S3.ts

2
packages/nocodb/src/cache/RedisCacheMgr.ts vendored

@ -98,7 +98,7 @@ export default class RedisCacheMgr extends CacheMgr {
async setExpiring(key: string, value: any, seconds: number): Promise<any> {
if (typeof value !== 'undefined' && value) {
log(
`RedisCacheMgr::set: setting key ${key} with value ${value} for ${seconds} seconds`,
`RedisCacheMgr::setExpiring: setting key ${key} with value ${value} for ${seconds} seconds`,
);
if (typeof value === 'object') {
if (Array.isArray(value) && value.length) {

2
packages/nocodb/src/cache/RedisMockCacheMgr.ts vendored

@ -93,7 +93,7 @@ export default class RedisMockCacheMgr extends CacheMgr {
async setExpiring(key: string, value: any, seconds: number): Promise<any> {
if (typeof value !== 'undefined' && value) {
log(
`RedisMockCacheMgr::set: setting key ${key} with value ${value} for ${seconds} seconds`,
`RedisMockCacheMgr::setExpiring: setting key ${key} with value ${value} for ${seconds} seconds`,
);
// TODO: better way to handle expiration in mock redis

6
packages/nocodb/src/plugins/s3/S3.ts

@ -106,12 +106,14 @@ export default class S3 implements IStorageAdapterV2 {
});
}
public async getSignedUrl(key, expires = 7200) {
public async getSignedUrl(key, expiresInSeconds = 7200) {
const command = new GetObjectCommand({
Key: key,
Bucket: this.input.bucket,
});
return getSignedUrl(this.s3Client, command, { expiresIn: expires });
return getSignedUrl(this.s3Client, command, {
expiresIn: expiresInSeconds,
});
}
public async init(): Promise<any> {

Loading…
Cancel
Save