IPWorks Cloud 2020 Node.js Edition

Questions / Feedback?

UpdateItemInfo Method

Updates an item with new information.

Syntax

sharefile.updateItemInfo(itemId, [callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This method updates the item information for an item identified by ItemId. The item should be in the Item* properties and should be modified from there.

The following properties can be updated from the ShareFileItem* properties:

  • Description
  • ExpirationTime
  • Name
  • ParentId

Note that the string root may be used as a ParentId to represent the root folder, and the string home may be used as a folder Id to represent the home folder for the current user. Other special id's include:

  • home
  • favorites
  • allshared
  • connectors
  • box
  • top.

ShareFile.Items[0].Description = "New Description";
ShareFile.Items[0].ExpirationDate = "2099-01-01T00:00:00Z";
ShareFile.Items[0].Name = "New_Name.txt";
ShareFile.Items[0].ParentId = ShareFile.Items[1].Id;
ShareFile.UpdateItemInfo(ShareFile.Items[0].Id);

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 Node.js Edition - Version 20.0 [Build 8265]