is there any size limit for pdf in hyperledger fabric?

后端 未结 1 1688
耶瑟儿~
耶瑟儿~ 2021-01-16 21:16

I have created small poc using hyperledger fabric and composer. In my project, I am uploading 2 files, for the first time the file getting uploaded but when I am trying to u

相关标签:
1条回答
  • 2021-01-16 21:23

    So technically, this is 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. You can define 'String' for your chosen (modeled Asset type etc) field to host in Hyperledger Composer. The theory is that, once it is a string, it is sent to the chaincode just like any other string.

    these links may help:

    -> https://www.thepolyglotdeveloper.com/2016/02/convert-an-uploaded-image-to-a-base64-string-in-node-js/

    -> https://belltane.wordpress.com/2017/03/27/storing-images-in-hyperledger-fabric-blockchain/

    0 讨论(0)
提交回复
热议问题