Skip to content

Commit 81d5863

Browse files
committed
Fix chunk upload in Deno
1 parent 4a3cf9a commit 81d5863

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

templates/deno/src/services/service.ts.twig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ export class {{ service.name | caseUcfirst }} extends Service {
150150
totalBuffer[(blockIndex * Client.DENO_READ_CHUNK_SIZE) + byteIndex] = buf[byteIndex];
151151
}
152152
}
153+
154+
// Shrink empty bytes
155+
totalBuffer = new Uint8Array(totalBuffer.buffer, 0);
153156

154157
payload['{{ parameter.name }}'] = new File([totalBuffer], basename({{ parameter.name | caseCamel | escapeKeyword }}));
155158

0 commit comments

Comments
 (0)