fixes download

This commit is contained in:
Ben 2025-05-26 13:30:31 +02:00
parent 05daffc2f5
commit 25000aa807
No known key found for this signature in database
GPG Key ID: 0F16E812E736C24B

View File

@ -31,16 +31,15 @@ export class DataService {
};
download = async (cid) => {
throw new Error("Waiting for fix of codex-js sdk");
const data = this.getCodexData();
const manifest = await data.fetchManifest(cid);
const filename = this.getFilename(manifest);
const response = await data.networkDownloadStream(cid);
const fileData = response.data;
const fileData = await response.data.text();
fs.writeFileSync(filename, fileData);
return filename;
};
getCodexData = () => {