- ipfs or storj
- hash of image and store file on s3
- convert the image to a Base64 string and store string in composer model
相关问题
- How to add a new Orderer Organization to existing
- How do you generate pool_transactions_genesis and
- chaincode in hyperledger composer vs chaincode in
- Hyperledger fabcar sample fabric showing connect f
- Hyperledger Docker endpoint not found
相关文章
- Does Composer needs an already built Fabric networ
- Hyperledger transaction verification
- Hyperledger Fabric - Error while Instantiating cha
- Hyperledger fabric's ChannelCreationPolicy
- what kind of peer types does hyperledger have?
- Asset Creation through Transaction in Hyperledger
- hyperledger fabric first_network example create ch
- Difference between Fabric CA server and CA Client
You can use String and base64 encode it - as a field in an Asset for example.
The question has been discussed here: How can I convert MP3 file to a Base64 encoded string? and here: How to deal with forms,images,videos of an asset in hyperledger composer .
Storing images, scans, audio files is not a 'best practice' - rather, a cryptographic hash of it (referenced off-chain) is verifiable proof that the source is the exact image/media file that was 'hashed' at the time the 'transaction' was recorded on the blockchain and link out of the chain, to a URL containing the verifiable source (and comparable hash). Examples may be: doctor/patient audio discussions (not least the privacy elements!) & consultation recordings, PDFs, mp3s, image files. Another issue is that an encoded base64 image string (if you chose to encode the media/image file that is) will also need to be transmitted to the other peers participating in consensus and written to their copy of the master ledger. It is therefore more efficient, to only share the hash (not the base64 encoded contents with each peer).
Sahil, you need not store an encrypted file in blockchain. One solution is (for keeping privacy of your data) to store the hash of your file in an asset field. The encryption of the same data will sit outside the blockchain, so your have to create one asset field containing the link to that encrypted file.