How can I add image into my Hyperledger instance

+1 vote

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 a smart contract for the registry

hyperledger-fabric blockchai

Jun 8, 2018 in Blockchain by charlie_brown
• 7,710 points

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+1 vote
Best answer

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.

-> How to deal with forms,images,videos of an asset in hyperledger composer

answered Jun 8, 2018 by ariaholic
• 7,320 points

selected Aug 16, 2018 by Omkar

Related Questions In Blockchain

0 votes
1 answer

How can i import the csv/excel files into my contract and record the transaction ?

You can not directly import an excel/csv ...READ MORE

answered Apr 16 in Blockchain by Omkar
• 65,810 points
+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 6, 2018 in Blockchain by Christine
• 15,790 points
+1 vote
1 answer

Hyperledger - How can I use transaction certificates to enforce privacy?

The transaction certificates don't actually address privacy ...READ MORE

answered Apr 17, 2018 in Blockchain by Perry
• 16,450 points
+1 vote
1 answer
0 votes
1 answer
+1 vote
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
0 votes
1 answer
0 votes
1 answer

Where can I find the reference format for crypto-config.yaml and configtx.yaml Hyperledger Fabric files?

The sample config files in the Hyperledger Fabric main ...READ MORE

answered Jun 27, 2018 in Blockchain by ariaholic
• 7,320 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.