mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Handle rangeHashes
GitOrigin-RevId: 9b9a67d8e45f17e948d003aed33cef6128a25744
This commit is contained in:
@@ -49,10 +49,18 @@ class BackupBlobStore {
|
||||
* Required for BlobStore interface - not supported.
|
||||
*
|
||||
* @template T
|
||||
* @param {string} hash
|
||||
* @return {Promise<T>}
|
||||
*/
|
||||
async getObject() {
|
||||
throw new Error('Not implemented')
|
||||
async getObject(hash) {
|
||||
try {
|
||||
const stream = await this.getStream(hash)
|
||||
const buffer = await streams.readStreamToBuffer(stream)
|
||||
return JSON.parse(buffer.toString())
|
||||
} catch (err) {
|
||||
logger.warn({ err, hash }, 'Failed to fetch chunk blob')
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user