Sending raw file to Multichain

+1 vote

I read somewhere recently that Multichain can do the same thing as IPFS...even allowing someone to send raw files to the chain using streams.

This saves an individual time from having 3 programs on their system: IPFS, Multichain, and a middleware connecting the two, correct?

Say I have a 1080HD video file I want to send to the chain. Would I do it like this?

1. Convert raw file to binary
2. Convert binary to hexadecimal
3. Send hexadecimal to Multichain as data

Or am I missing a step?

And how can someone else retrieve the raw 1080HD video to view from the chain?

Thanks in advance for answering my questions.

asked Sep 20 by Pavon Dunbar

1 Answer

0 votes

We recommend using the binary cache for this, since it gives you a fast and easy way to get large pieces of data in and out of MultiChain without converting to hexadecimal and using the JSON-RPC API.

See section 6 of Getting Started for an example:

For writing, use createbinarycache, then put the data into the cache file directly, then publish using the {"cache":"Ev1HQV1aUCY"} parameter form, then deletebinarycache.

For reading, use createbinarycache, txouttobinarycache, then read the data from the cache file directly, then deletebinarycache.

If you're working with large pieces of data we recommend publishing the data off-chain, by passing the offchain in the options parameter when publishing.

answered Sep 21 by MultiChain