How to store photos in Hyperledger smart contract?

0 votes
I am trying to build a project that would store pictures in the smart contract and send it as a transaction.. How can i implement it?
Jul 9, 2018 in Blockchain by digger
• 27,620 points
58 views

1 answer to this question.

0 votes
To do this, you need to represent your image as a byte array or you can use a link to point to a resource outside blockchain and mention it as a parameter for value attribute in the follow code:

PutState(key string, value []byte)
answered Jul 9, 2018 by slayer
• 29,050 points

Related Questions In Blockchain

0 votes
1 answer

How do I send back ethers to the sender of the tokens in a smart contract?

Whenever a smart contract receives ether via ...READ MORE

answered May 30, 2018 in Blockchain by Perry
• 17,010 points
269 views
0 votes
1 answer

How to store picture(s) in a hyperledger blockchain channel

You can hold images as encrypted characters ...READ MORE

answered Jun 16, 2018 in Blockchain by charlie_brown
• 7,710 points
112 views
0 votes
1 answer

How to prevent the smart contract from being modified and deployed in the blockchain network?

To expand on Matthew's answer, each state ...READ MORE

answered Jul 5, 2018 in Blockchain by ariaholic
• 7,320 points
39 views
0 votes
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 27,620 points
55 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
105 views
0 votes
1 answer

How to solve "error trying install composer runtime" in Hyperledger composer?

I think the docker-compose tool is not ...READ MORE

answered Jul 17, 2018 in Blockchain by slayer
• 29,050 points
66 views
+1 vote
2 answers

How to configure Endorsement policy in Hyperledger?

The Hyperledger Fabric Endorsement policy is configured ...READ MORE

answered Jul 25, 2018 in Blockchain by slayer
• 29,050 points
687 views