From d2d556ddf62460c71a5689b9187d15f66812b67a Mon Sep 17 00:00:00 2001 From: Andrew Rumble Date: Mon, 17 Mar 2025 15:57:26 +0000 Subject: [PATCH] Allow cached persistor to get size of a blob GitOrigin-RevId: 7e2c14381cf717c21325917ef4f78acb340a50d9 --- .../src/PerProjectEncryptedS3Persistor.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libraries/object-persistor/src/PerProjectEncryptedS3Persistor.js b/libraries/object-persistor/src/PerProjectEncryptedS3Persistor.js index 0395bcaa48..7bd4bb93e5 100644 --- a/libraries/object-persistor/src/PerProjectEncryptedS3Persistor.js +++ b/libraries/object-persistor/src/PerProjectEncryptedS3Persistor.js @@ -414,6 +414,16 @@ class CachedPerProjectEncryptedS3Persistor { return await this.sendStream(bucketName, path, fs.createReadStream(fsPath)) } + /** + * + * @param {string} bucketName + * @param {string} path + * @return {Promise} + */ + async getObjectSize(bucketName, path) { + return await this.#parent.getObjectSize(bucketName, path) + } + /** * @param {string} bucketName * @param {string} path