Procházet zdrojové kódy

Allow cached persistor to get size of a blob

GitOrigin-RevId: 7e2c14381cf717c21325917ef4f78acb340a50d9
Andrew Rumble před 1 rokem
rodič
revize
d2d556ddf6

+ 10 - 0
libraries/object-persistor/src/PerProjectEncryptedS3Persistor.js

@@ -414,6 +414,16 @@ class CachedPerProjectEncryptedS3Persistor {
     return await this.sendStream(bucketName, path, fs.createReadStream(fsPath))
     return await this.sendStream(bucketName, path, fs.createReadStream(fsPath))
   }
   }
 
 
+  /**
+   *
+   * @param {string} bucketName
+   * @param {string} path
+   * @return {Promise<number>}
+   */
+  async getObjectSize(bucketName, path) {
+    return await this.#parent.getObjectSize(bucketName, path)
+  }
+
   /**
   /**
    * @param {string} bucketName
    * @param {string} bucketName
    * @param {string} path
    * @param {string} path