# Js-ipfs: ipfs.files.cat() with /IPFS/ or /IPNS/ prefixed address

**URL:** <https://discuss.ipfs.tech/t/js-ipfs-ipfs-files-cat-with-ipfs-or-ipns-prefixed-address/1467>\
**Category:** Uncategorized\
**Tags:** js-ipfs, ipns\
**Created:** [November 17, 2017, 6:04am UTC](https://discuss.ipfs.tech/t/js-ipfs-ipfs-files-cat-with-ipfs-or-ipns-prefixed-address/1467 "2017-11-17T06:04:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arby](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/arby/32/2435_2.png) [@arby](https://discuss.ipfs.tech/u/arby)\
**Post date:** [November 17, 2017, 6:04am UTC](https://discuss.ipfs.tech/t/js-ipfs-ipfs-files-cat-with-ipfs-or-ipns-prefixed-address/1467/1 "2017-11-17T06:04:27Z")

</div>

In the `ipfs/interface-ipfs-core` files API documentation:

> <https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/FILES.md#cat>

The example used is:

```
ipfs.files.cat(ipfsPath, function (err, file) {
  // file will be a stream containing the data of the file requested
})

```

Where `ipfsPath` is described as: `ipfsPath can be of type: String, ie. '/ipfs/QmXEmhrMpbVvTh61FNAxP9nU7ygVtyvZA8HZDUaqQCAb66'`

In practice (client-side Javascript), I’m getting an error: **Non-base58 character** when I use `ipfs.files.cat()`with a `/IPFS/` or `/IPNS/` prefixed address instead of a multihash. Is there a particular encoding (some sort of bs58 multihash?) for referencing an IPNS published file, or is this still on the TODO list?

Edit: I was able to get `/IPFS/` paths to read on the client using a fresh bundle. It looks like a `ipfs.name.resolve()` command is the missing piece needed to pull this off with `/IPNS/`
