Is it possible to send an image and text and video in one datastream transaction?

+2 votes
Hi,

I have a datastream transaction that I would like to add to my blockchain. It consists of an image, audio, and video file all of which describe a certain data set. Is it possible to list all in one transaction instead of adding 3 separate transactions for it? Thanks.
asked Jan 31, 2017 by abhinavramesh12

1 Answer

+1 vote

Sure, you have a couple of ways to do this with streams:

  1. Create your own container format which puts all the data into a single binary stream item. It can be as simple as zero or more repeats of (4-byte length indicator + raw data of that length). This is easy to build and easy to unpack on the receiving end.
  2. Use a separate stream for each of the file types, and use raw transactions to write to multiple streams in a single transaction. There's an example of how to do it on this page: http://www.multichain.com/developers/raw-transactions/
Note that the current version MultiChain is limited to 8 MB per stream item, but that limit is about to increase.
answered Jan 31, 2017 by MultiChain
...