*replace protocol format with path format

This commit is contained in:
Derrick Hammer 2023-04-17 02:36:32 -04:00
parent 4ddfa970aa
commit f9f074e73f
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 0 deletions

View File

@ -71,6 +71,8 @@ export default class IpfsProvider extends BaseProvider {
let err; let err;
let stat: UnixFSStats | null = null; let stat: UnixFSStats | null = null;
const parsedPath = path.parse(urlPath); const parsedPath = path.parse(urlPath);
cid = cid.replace("ipns://", "/ipns/");
cid = cid.replace("ipfs://", "/ipfs/");
try { try {
if (ipnsPath(cid)) { if (ipnsPath(cid)) {
const cidHash = cid.replace("/ipns/", ""); const cidHash = cid.replace("/ipns/", "");