How do i add images in hyperledger

0 votes
I am trying to make a registry based on hyperperledger with composer .

1- How to integrate image upload with hyperledger Fabric and Composer and How to create smart contract for the registry
Aug 21, 2018 in Blockchain by Johnathon
• 9,090 points
569 views

1 answer to this question.

0 votes
In your registry, you can Base64-ify your image/content/media and store as String. In your modeled Asset in Hyperledger Composer, one attribute for 'imageString' is defined as 'String in your Hyperledger Composer model file.

Technically, this is also a Node question. Using Javascript, eg. fs.readFileSync(‘yourimageFile.jpg’).toString(‘base64’);, you should be able to convert the image to a Base64 string in your code.

please also see this link for more information - it tells you how to go about storing your images (media, PDFs etc) - and the comments at the end.
answered Aug 21, 2018 by Perry
• 17,100 points

Related Questions In Blockchain

+1 vote
1 answer

How do i add images in Hyperledger?

You can not directly add an image ...READ MORE

answered Aug 10, 2018 in Blockchain by Omkar
• 69,220 points
944 views
+4 votes
2 answers

How do I create a new block in Hyperledger Fabric?

This link might help you: https://github.com/hyperledger/fabric-sample ...READ MORE

answered Oct 11, 2018 in Blockchain by Sahu
2,655 views
+3 votes
4 answers

How do I add a new node on a Hyperledger network?

You can do this by generating the crypto ...READ MORE

answered Apr 7, 2018 in Blockchain by Christine
• 15,790 points
5,728 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
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
• 26,740 points
1,004 views
+1 vote
1 answer
+15 votes
5 answers
+1 vote
1 answer

How do i generate corda nodes keystores in dev mode?

In Corda, the node will look into ...READ MORE

answered Apr 11, 2018 in Blockchain by Perry
• 17,100 points
1,701 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP