Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter chomarac

    (@chomarac)

    Ok thanks

    Thread Starter chomarac

    (@chomarac)

    For now, the document hash is added on the blockchain when the document is uploaded, in “display_sp_client_upload_process()” function. I’m using web3 js library so my code is JavaScript in your php file. Here is the code to add the hash to my smart contract :

    myContractInstance.addNewDocument(‘.$fileNum.’,”‘.$fileHash.'”,”‘.$clientAddr.'”,function (err, res) {
    if(err){
    // display error
    } else {
    // display success
    });

    Then I added a button to sign the document when you’re not an admin. The code is in “view_file()” function. First I check the hash of the document, I check if the document is already signed or not, and then you can sign the doc. I also customized “file_list()” to display in the list if the document is certified or not.

    Do I have a full documentation with the premium plugin?

Viewing 2 replies - 1 through 2 (of 2 total)