I'm developing some POCs over an API REST exposed from the deployed blockchain instance with composer. I can model my asset types and the relations with rules or smart contracts.
But what if I want to store data such as pdf, mp3 or so? What is the best practice here?
Should I get a checksum (SHA256 for example) of the file, and store it on the blockchain to check it later with the real data file from an storage data base like COS or so? Or could I store the file directly on the blockchain? Or should I generate a base64 string of the file, and store it on the JSON object that is saved in the blockchain?
A good practice is to store the files off the chain and just have the hash tracked on the blockchain. If you start appending file to the blockchain then the size of transactions will also be an issue.
Hi all,
I'm developing some POCs over an API REST exposed from the deployed blockchain instance with composer. I can model my asset types and the relations with rules or smart contracts.
But what if I want to store data such as pdf, mp3 or so? What is the best practice here? Should I get a checksum (SHA256 for example) of the file, and store it on the blockchain to check it later with the real data file from an storage data base like COS or so? Or could I store the file directly on the blockchain? Or should I generate a base64 string of the file, and store it on the JSON object that is saved in the blockchain?
Thanks in advance