AltExecCnsContract.prototype.deleteFile

Delete file protected by access control.

Internally calls http DELETE /file on the AltExecCnsAPI.

Parameters

Name Type Description
password string Account password
contractName string Target contract name
functionName string Target function name
objectId string FileObject ID
params array Parameters to pass to Contract function
abi JSONObject ABI of the contract to call
callback function callback

Callback

Name Type Description
err error Error
txHash string Transaction hash of executed transaction

Usage

contract.deleteFile('__PASSWORD__', 'File', 'delete', 'file-object1', ['file1'], abi, function(err, txHash) {
  if (err) console.error(err);
  else console.log(txHash);
}

results matching ""

    No results matching ""