diff --git a/package.json b/package.json index 9673d77075..d1f51beaab 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,7 @@ "ipfs-multipart": "~0.1.0", "ipfs-repo": "~0.26.0", "ipfs-unixfs": "~0.1.16", - "ipfs-unixfs-engine": "~0.35.2", + "ipfs-unixfs-engine": "~0.35.3", "ipld": "~0.20.1", "ipld-bitcoin": "~0.1.8", "ipld-dag-pb": "~0.15.0", diff --git a/src/http/api/resources/files-regular.js b/src/http/api/resources/files-regular.js index c8fae5112f..cbbf91a5f0 100644 --- a/src/http/api/resources/files-regular.js +++ b/src/http/api/resources/files-regular.js @@ -1,6 +1,6 @@ 'use strict' -const mh = require('multihashes') +const CID = require('cids') const multipart = require('ipfs-multipart') const debug = require('debug') const tar = require('tar-stream') @@ -51,7 +51,7 @@ exports.parseKey = (request, reply) => { } try { - mh.fromB58String(key) + new CID(key) // eslint-disable-line no-new } catch (err) { log.error(err) return reply({