diff --git a/SampleCode/LabelingUX/Client/src/providers/storageProvider.test.ts b/SampleCode/LabelingUX/Client/src/providers/storageProvider.test.ts index c0974f9..283a265 100644 --- a/SampleCode/LabelingUX/Client/src/providers/storageProvider.test.ts +++ b/SampleCode/LabelingUX/Client/src/providers/storageProvider.test.ts @@ -45,7 +45,9 @@ describe("StorageProvider", () => { it("should handle readBinary", async () => { await provider.readBinary(mockFilename); - expect(RequestHelper.getWithAutoRetry).toBeCalledWith(`${serverUrl}/files/${mockFilename}`); + expect(RequestHelper.getWithAutoRetry).toBeCalledWith(`${serverUrl}/files/${mockFilename}`, { + responseType: "arraybuffer", + }); }); it("should handle writeText", async () => { diff --git a/SampleCode/LabelingUX/Client/src/providers/storageProvider.ts b/SampleCode/LabelingUX/Client/src/providers/storageProvider.ts index c9882e5..ff3ea74 100644 --- a/SampleCode/LabelingUX/Client/src/providers/storageProvider.ts +++ b/SampleCode/LabelingUX/Client/src/providers/storageProvider.ts @@ -64,7 +64,7 @@ export class StorageProvider implements IStorageProvider { public async readBinary(filename: string, ignoreNotFound?: boolean): Promise { try { const api = `${serverUrl}/files/${filename}`; - const result = await getWithAutoRetry(api); + const result = await getWithAutoRetry(api, { responseType: "arraybuffer" }); return result.data; } catch (exception) {