Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 43a60c2

Browse files
author
Alan Shaw
committed
feat: support the version param
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent 79dc0b9 commit 43a60c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/block/put.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ module.exports = configure(({ ky }) => {
1616
...options,
1717
format: data.cid.codec,
1818
mhtype: name,
19-
mhlen: length
19+
mhlen: length,
20+
version: data.cid.version
2021
}
2122
data = data.data
2223
}
@@ -26,6 +27,7 @@ module.exports = configure(({ ky }) => {
2627
if (options.format) searchParams.set('mhtype', options.mhtype)
2728
if (options.mhlen) searchParams.set('mhlen', options.mhlen)
2829
if (options.pin != null) searchParams.set('pin', options.pin)
30+
if (options.version != null) searchParams.set('version', options.version)
2931

3032
const body = new FormData()
3133
body.append('file', data)

0 commit comments

Comments
 (0)