Expand kv api

This commit is contained in:
2023-11-19 22:35:56 -07:00
parent 7c40650b9a
commit 5a54a9ca5b
9 changed files with 154 additions and 75 deletions

View File

@@ -88,4 +88,19 @@ export class MinioService {
): Promise<void> {
await this.client.removeObject(bucketName, objectName);
}
/**
*
* @param bucketName
* @param objectName
* @param expiry Expiry in seconds
* @returns
*/
public async generatePresignedUrl(
bucketName: string,
objectName: string,
expiry: number = 60 * 60 * 24,
): Promise<string> {
return await this.client.presignedGetObject(bucketName, objectName, expiry);
}
}