*replace protocol format with path format
This commit is contained in:
parent
4ddfa970aa
commit
f9f074e73f
|
@ -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/", "");
|
||||||
|
|
Reference in New Issue