This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed
Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ module.exports = (send) => {
1717
1818 callback = callback || noop
1919
20- let hashAlg = options . hashAlg || 'sha2-256'
20+ let hashAlg = options . hash || 'sha2-256'
2121 let format
2222 let inputEnc
2323
@@ -33,20 +33,12 @@ module.exports = (send) => {
3333 }
3434
3535 function prepare ( ) {
36- if ( format === 'dag-cbor' ) {
37- // TODO change this once
38- // https://github.com/ipfs/go-ipfs/issues/3771 is finished
39- format = 'cbor'
36+ inputEnc = 'raw'
4037
41- inputEnc = ' cbor'
38+ if ( format === 'dag- cbor') {
4239 dagCBOR . util . serialize ( dagNode , finalize )
4340 }
4441 if ( format === 'dag-pb' ) {
45- // TODO change this once
46- // https://github.com/ipfs/go-ipfs/issues/3771 is finished
47- format = 'protobuf'
48-
49- inputEnc = 'protobuf'
5042 dagPB . util . serialize ( dagNode , finalize )
5143 }
5244 }
@@ -57,9 +49,9 @@ module.exports = (send) => {
5749 send ( {
5850 path : 'dag/put' ,
5951 qs : {
60- hashAlg : hashAlg , // not implemented in go yet https://github.com/ipfs/go-ipfs/issues/3771
52+ hash : hashAlg ,
6153 format : format ,
62- inputenc : inputEnc
54+ 'input-enc' : inputEnc
6355 } ,
6456 files : serialized
6557 } , ( err , result ) => {
You can’t perform that action at this time.
0 commit comments