POST 重新命名指定文件夹

参数:

参数 说明
folderId 文件夹 ID
folderName 新的文件夹名

**

范例代码:

  1. var data = {
  2. "folderId": "KBHOIWCUO6U9I",
  3. "folderName": "新的名称"
  4. };
  5. var requestOptions = {
  6. method: 'POST',
  7. body: JSON.stringify(data),
  8. redirect: 'follow'
  9. };
  10. fetch("http://localhost:41595/api/folder/rename", requestOptions)
  11. .then(response => response.json())
  12. .then(result => console.log(result))
  13. .catch(error => console.log('error', error));

返回结果:

  1. {
  2. "status": "success",
  3. "data": {
  4. "id": "KBJJSMMVF9WYL",
  5. "name": "新的名称",
  6. "images": [],
  7. "folders": [],
  8. "modificationTime": 1592409993367,
  9. "imagesMappings": {},
  10. "tags": [],
  11. "children": [],
  12. "isExpand": true,
  13. "size": 30,
  14. "vstype": "folder",
  15. "styles": {
  16. "depth": 0,
  17. "first": false,
  18. "last": false
  19. },
  20. "isVisible": true,
  21. "$$hashKey": "object:765",
  22. "newFolderName": "文件夹名称",
  23. "editable": false,
  24. "pinyin": "XINDEMINGCHENG"
  25. }
  26. }