fix: dont pass responseType, as we want a blob

This commit is contained in:
Derrick Hammer 2024-02-13 00:25:47 -05:00
parent bc6d545501
commit 3c9022d8c7
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 7 additions and 7 deletions

View File

@ -4,8 +4,13 @@ import { S5Client } from "../client.js";
import { CustomClientOptions, optionsToConfig } from "../utils/options.js";
import path from "path";
import { DEFAULT_UPLOAD_OPTIONS } from "#methods/upload.js";
import { getS5DownloadCid, getS5MetadataCid } from "#generated/index.js";
import {
getS5BlobCid,
getS5DownloadCid,
getS5MetadataCid,
} from "#generated/index.js";
import { addUrlQuery } from "#utils/url.js";
import { customInstance } from "#axios.js";
/**
* Custom download options.
@ -135,12 +140,7 @@ export async function downloadData(
const config = optionsToConfig(this, DEFAULT_DOWNLOAD_OPTIONS, customOptions);
return await (
await getS5DownloadCid(cid, {
...config,
responseType: "arraybuffer",
})
).arrayBuffer();
return await (await getS5DownloadCid(cid, config)).arrayBuffer();
}
/**