fix: use proper blob size in backup (#7032)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov 2024-10-24 18:12:47 +07:00 committed by GitHub
parent 2390b0d761
commit 54f3376438
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1840,7 +1840,7 @@ export async function restore (
if (Number.isNaN(sz) || sz !== bf.length) {
sz = bf.length
}
void blobClient.upload(ctx, doc._id, doc.size, doc.contentType, bf).then(() => {
void blobClient.upload(ctx, doc._id, sz, doc.contentType, bf).then(() => {
void sendChunk(doc, bf.length).finally(() => {
requiredDocs.delete(doc._id)
printUploaded('upload', bf.length)