0

I have been researching online a lot, and I have hit a roadblock.

My current situation is that I have a hash inside my blockchain, and this would reference a file that will return this from off chain. My question is that would using IPFS and Storj even be possible using Hyperledger Composer? If so, how would the integration process work? My case right now would require the use of Hyperledger due to its architecture over Ethereum, so it is much preferable to use Hyperledger.

Besides this, I would also like to create a custom front end. Is it possible to work on custom CSS and code, for example, using Angular?

Brian
  • 21
  • 3

1 Answers1

0

yes - firstly see storage options discussed in this thread -> Best practice to save files in blockchain -

In Composer you could store the hash as a string on an asset in your model etc etc and you can retrieve via IPFS client search etc once you've got your asset (eg by name or ID) etc .- lastly see this announce for current status of Composer FYI

Paul O'Mahony
  • 6,740
  • 1
  • 10
  • 15
  • Thank you for the response! Sadly, I already do know how to store it in theory, and I am quite aware of the fact that IPFS, for example, exists. I was wondering how the integration in code would look like for example? – Brian Nov 19 '18 at 22:51
  • one example is posted here -> using composer-client https://github.com/Preetam007/hyperledger_composer_file_storage/blob/master/modules/v0/assets/assets-crud.js#L20 (he's updating the ipfs reference to an asset in the Composer business network). As I mentioned, once you have your reference, you can store it as a reference in a string on an asset instance then in your app, build the real URL to retrieve etc. – Paul O'Mahony Nov 20 '18 at 12:58
  • There's loads of resources on the web to describe (ie non-Composer related) how to interact with IPFS from Angular eg https://medium.com/@GrandSchtroumpf/ipfs-and-angular-6-6165e6fd6e5d in particular app.component.ts shown there – Paul O'Mahony Nov 20 '18 at 12:58
  • This is great! Thank you very much. I'll take a look at these – Brian Nov 21 '18 at 09:59