mirror of
https://github.com/logos-storage/logos-storage-installer.git
synced 2026-01-08 00:13:07 +00:00
fixes download
This commit is contained in:
parent
05daffc2f5
commit
25000aa807
@ -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 = () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user