Update a file protected by access control.

Internally calls http PUT /file on the AltExecCnsAPI.
The difference from sendFile is that an error is returned if there is no data of the specified objectId.


Name Type Description
password string Account password
contractName string Target contract name
functionName string Target function name
objectId string DataObject ID
file File File to be saved in the data store
params array Parameters to pass to Contract function
abi JSONObject ABI of the contract to call
callback function callback


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


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

results matching ""

    No results matching ""