Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit ce39c5a

Browse files
fix failure
1 parent a4b5d31 commit ce39c5a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/http-api/resources/files.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@ exports.parseKey = (request, reply) => {
2323
}).code(400).takeover()
2424
}
2525

26+
let arg = request.query.arg
2627
try {
28+
if (arg.indexOf('/ipfs/') === 0) {
29+
arg = arg.replace('/ipfs/', '')
30+
}
31+
2732
return reply({
28-
key: mh.fromB58String(request.query.arg)
33+
key: mh.fromB58String(arg)
2934
})
3035
} catch (err) {
3136
log.error(err)

0 commit comments

Comments
 (0)