-3

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

Fam
  • 1
  • 1
  • 1
    Please include what attempts you have made so far and what is going wrong. – mypetlion Mar 20 '18 at 17:43
  • It would be nice (and proactive) to show us what you have tried so far and where you are stuck right now. we can help you sort an obstacle, we won't run the race for you. ;) – Scaramouche Mar 20 '18 at 17:44

1 Answers1

-1

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

Paul O'Mahony
  • 6,740
  • 1
  • 10
  • 15
  • Answers should not rely on links for the bulk of their content. Instead, use links as a supplementary resource for further reading. Links can go dead, or content can change. Please edit your answer to include a summary or explanation of the information in your link. – mypetlion Mar 20 '18 at 19:47