about publish data

+1 vote
i want publish a file and two parameter, but i don't know finish it.

i'm try add details in the createrawsendfrom command, but i can't get it

have any method?
asked May 17, 2018 by hungry47
edited May 17, 2018 by hungry47
Please clarify – you want to publish two stream items simultaeously, one with a file and the other with some kind of JSON? Are you using MC 2.0 alpha?

1 Answer

0 votes

OK, so I'm assuming you're using MultiChain 2.0 alpha. Here's how you publish multiple JSON items (assuming you're using Linux):

createrawsendfrom [from-address] '{}' '[
{"for":"stream1","key":"key1","data":{"json":null}},{"for":"stream1","key":"key2","data":{"json":null}},{"for":"stream1","key":"key3","data":{"json":null}}
]' send

Replace the null values with the real JSON you want. Line breaks inserted for readability.

answered May 18, 2018 by MultiChain
thank u. i had try solution,but it didn't work it.
if i use MC 1.0 alpha. how could i use publishfrom command finish it?
The publishfrom comment can only publish a single item in a transaction. You need to use createrawsendfrom to publish multiple items. And if you want them to be in the same stream and be indexed properly by other nodes, you need to be on MC 2.0 alpha.
...