/api/folder/rename

POST Rename the specified folder.

Parameter

Description

folderId

The folder's ID

newName

The new name of the folder

Sample Code:

var data = {
    "folderId": "KBHOIWCUO6U9I",
    "newName": "New Folder Name"
};

var requestOptions = {
  method: 'POST',
  body: JSON.stringify(data),
  redirect: 'follow'
};

fetch("http://localhost:41595/api/folder/rename", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Results Returned:

{
    "status": "success",
    "data": {
        "id": "KBJJSMMVF9WYL",
        "name": "New Folder Name",
        "images": [],
        "folders": [],
        "modificationTime": 1592409993367,
        "imagesMappings": {},
        "tags": [],
        "children": [],
        "isExpand": true,
        "size": 30,
        "vstype": "folder",
        "styles": {
            "depth": 0,
            "first": false,
            "last": false
        },
        "isVisible": true,
        "$$hashKey": "object:765",
        "newFolderName": "The Folder Name",
        "editable": false,
        "pinyin": "New Folder Name"
    }
}

Last updated