We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 111606e commit 920e036Copy full SHA for 920e036
src/common/utils/fileUtils.ts
@@ -54,11 +54,15 @@ export async function downloadFile(params: {
54
const error = new Error("Maximum file size exceeded");
55
error.name = ErrorName.MAX_FILE_SIZE_EXCEEDED;
56
throw error;
57
+ }
58
+ const allBytes = new Uint8Array(totalBytes);
59
+ let offset = 0;
60
+ for (const chunk of chunks) {
61
+ allBytes.set(chunk, offset);
62
+ offset += chunk.length;
63
}
- const blob = new Blob(chunks);
- const arrayBuffer = await blob.arrayBuffer();
64
const decoder = new TextDecoder();
- return decoder.decode(arrayBuffer);
65
+ return decoder.decode(allBytes);
66
67
68
export function checkIfJsonOrYaml(fileText: string) {
0 commit comments